
The function of these buttons are to show different types of custom Toast messages.ġ0- Now open up MainActivity.java, here you need to reference those views that you’ve created them earlier inside the xml file. This Spinner will be use to change the text size of Android Toast message.ĩ- Next you need to add those 6 Android Buttons.

The TextView have a label that says (Choose Toast text size), below it there is a Spinner which have a margin bottom of (20dp). ( Large preview)ħ- Open up activity_main.xml file, in this file you need to add Android TextView, Spinner and 6 Buttons.Ĩ- First you need to add a TextView and a Spinner.

( Large preview)ĥ- Open up colors.xml file to change the colors of the main app.Ħ- Build and run the app to see the new colors.Ĭhanged colors of the app. Implementation ':Toasty:1.3.0'ģ- Next you need to open up adle (Project) and add Maven because this library is available through it.Ĥ- Now sync your project by clicking on Sync Now.Īndroid studio sync project. ( Large preview)Ģ- Open up adle (module:app) and add the library in the dependencies. In this tutorial we will be using the following:ġ- Open up Android Studio and open any project that you have in your computer.Ĭreate new Android Studio project or open existing project.

You will be using a 3rd party library called Toasty to help you make custom Android Toast. This will make Android Toast more interactive and less boring 🙂īy the end of this tutorial, you will have an app that looks like this. Hello and welcome to another tutorial from Codingdemos, in this tutorial you will learn how to customize Android Toast message to something more colorful by including color and icon.
