How to Customise Toast in Android? -


this question has answer here:

is possible make customize toast in android. if can place in image icon , place button.

you can use regular maketext() , handle getview() set image next see next.

toast toast = toast.maketext(context, text, toast.length_short); textview tv = (textview) toast.getview().findviewbyid(android.r.id.message); if (null!=tv) {     tv.setcompounddrawableswithintrinsicbounds(icon, 0, 0, 0);     tv.setcompounddrawablepadding(context.getresources().getdimensionpixelsize(r.dimen.padding_toast)); 

Comments

Popular posts from this blog

c++ - Is it possible to compile a VST on linux? -

java - Output of Eclipse is rubbish -

jquery - Confused with JSON data and normal data in Django ajax request -