Home ยป Android Custom Toast Example

Android Custom Toast Example

by Online Tutorials Library

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.

File: MainActivity.java


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

You may also like