A simple way to customize your toast with different colors and icon!
You have to copy a class in your project which I created called Mytoast
And You have to copy a custom layout for toast, Which I created called toast_layout.xml
There is a only one standard method to display customized toast, This method returns a customized toast!
As You can see this method takes 3 extra values to make a toast.
It takes string value of color for toast
It takes string value of color for toasttextcolor.
It takes drawable Int to display icon in Toast.
Mytoast().make( this, "Please Check Your Internet Connection!", Toast.LENGTH_SHORT, "#f44336", // Toast BackgroundColor #ffffff, // Toast TextColor R.drawable.ic_warning_black_24dp // Drawable Int ).show()