In this tutorial I am using an android library to make a beautiful toast.

Copy this dependency paste it into gradle file of your project, the sync the project.

dependencies {
	compile 'com.sdsmdg.tastytoast:tastytoast:0.1.1'
}

All you have to fire this code to show the beautiful toast in your app.

TastyToast.makeText(getApplicationContext(), "Hello World !", TastyToast.LENGTH_LONG, TastyToast.WARNING);

The TastyToast.makeText() Except Only 4 Parameters.

  • Application Context
  • Toast Message
  • Toast Length
  • Toast Type

Do you like socialcodia's articles? Follow on social!
People reacted to this story.
Show comments Hide comments
Comments to: Make Beautiful Toast In Android In Just 1 Minute

Write a response

Your email address will not be published. Required fields are marked *

Attach images - Only PNG, JPG, JPEG and GIF are supported.

Good Reads

Worlwide

Trending

Login


Fatal error: Uncaught Error: Class 'Elementor\Scheme_Typography' not found in /home/socia106/domains/socialcodia.com/public_html/wp-content/themes/typer/inc/Elementor/Widgets/Onboarding.php:250 Stack trace: #0 /home/socia106/domains/socialcodia.com/public_html/wp-content/plugins/elementor/includes/base/controls-stack.php(2327): Seventhqueen\Typer\Onboarding->_register_controls() #1 /home/socia106/domains/socialcodia.com/public_html/wp-content/plugins/elementor/includes/base/controls-stack.php(496): Elementor\Controls_Stack->init_controls() #2 /home/socia106/domains/socialcodia.com/public_html/wp-content/plugins/elementor/includes/base/widget-base.php(177): Elementor\Controls_Stack->get_stack() #3 /home/socia106/domains/socialcodia.com/public_html/wp-content/plugins/elementor/includes/base/controls-stack.php(300): Elementor\Widget_Base->get_stack() #4 /home/socia106/domains/socialcodia.com/public_html/wp-content/plugins/elementor/includes/base/controls-stack.php(2416): Elementor\Controls_Stack->get_controls() #5 /home/soci in /home/socia106/domains/socialcodia.com/public_html/wp-content/themes/typer/inc/Elementor/Widgets/Onboarding.php on line 250