Android Custom Toast ExampleYou 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. activity_main.xmlDrag the component that you want to display on the main activity. File: activity_main.xml customtoast.xmlCreate another xml file inside the layout directory. Here we are having ImageView and TextView in this xml file. File: customtoast.xml Activity classNow write the code to display the custom toast. File: MainActivity.java Output:Next TopicAndroid ToggleButton Example |
We provides tutorials and interview questions of all technology like java tutorial, android, java frameworks
G-13, 2nd Floor, Sec-3, Noida, UP, 201301, India