Android: How to create a custom Toast


Davide Agostini /

1 min read

Hi and welcome in this new video tutorial where you will learn how to create a custom TOAST without using external libraries.

A TOAST is used to provides simple feedback about an operation in a small popup. It only fills the amount of space required for the message, and the current activity remains visible and interactive. Toasts automatically disappear after a timeout.

I suppose that there are three use cases: normal, success and error message and for those I created three custom resources.

Depending on the use case I will change the background color, the icon and text message.

Link to github source code

Subscribe to see more videos

← Back to the blog