How to Customise Toast in Android? -
this question has answer here:
- how customize toast in android 4 answers
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
Post a Comment