MyCustomToast

Additional

Language
Kotlin
Version
N/A
Created
Jan 6, 2019
Updated
Jan 7, 2019
Owner
MEET PRAJAPATI (meet30997)
Contributor
MEET PRAJAPATI (meet30997)
1
Activity
Badge
Generate
Download
Source code
APK file

Commercial

MyCustomToast-Android-Custom-Toast-With-Icon-and-color

A simple way to customize your toast with different colors and icon!

Installation

  1. You have to copy a class in your project which I created called Mytoast

  2. And You have to copy a custom layout for toast, Which I created called toast_layout.xml

Usage

There is a only one standard method to display customized toast, This method returns a customized toast!

As You can see this method takes 3 extra values to make a toast.

  1. It takes string value of color for toast

  2. background.

    It takes string value of color for toast

  3. textcolor.

    It takes drawable Int to display icon in Toast.

    Just Type null if you don't want to modify above values


    Please call show() method to display the toast.


Mytoast().make( this, "Please Check Your Internet Connection!", Toast.LENGTH_SHORT, "#f44336", // Toast BackgroundColor #ffffff, // Toast TextColor R.drawable.ic_warning_black_24dp // Drawable Int ).show()