I want to create a toast message with background color is white and message color is black. My toast message is:
Toast.makeText(Logpage.this, \"Please Give
Change default toast message color and background color in JAVA. You can change toast message color and background color this way..
Toast toast=Toast.makeText(MainActivity.this,"Signin button is clicked.",Toast.LENGTH_SHORT);
View view =toast.getView();
view.setBackgroundColor(Color.GREEN);
TextView toastMessage = (TextView) toast.getView().findViewById(android.R.id.message);
toastMessage.setTextColor(Color.RED);
toast.show();
Just change toast text color this way..
Toast toast = Toast.makeText(getApplicationContext(), "Signup button is clicked.",Toast.LENGTH_SHORT);
TextView toastMessage=(TextView) toast.getView().findViewById(android.R.id.message);
toastMessage.setTextColor(Color.BLUE);
toast.show();