Javatpoint Logo
Javatpoint Logo

Android Custom Toast Example

You are able to create custom toast in android. So, you can display some images like congratulations or loss on the toast. It means you are able to customize the toast now.


Drag the component that you want to display on the main activity.

File: activity_main.xml


Create another xml file inside the layout directory. Here we are having ImageView and TextView in this xml file.

File: customtoast.xml

Activity class

Now write the code to display the custom toast.



android custom toast example output 1 android custom toast example output 2

Youtube For Videos Join Our Youtube Channel: Join Now


Help Others, Please Share

facebook twitter pinterest

Learn Latest Tutorials


Trending Technologies

B.Tech / MCA