CustomToast - Android Library to show Custom Toast message

Overview

CustomToast

Android Library to show Custom Toast message

[Please don't use v1.2 or 1.2 they are deleted and not meant for production , they are actually not usable]

To get a Git project into your build:

Step 1. Add the JitPack repository to your build file

gradle

Add it in your root build.gradle at the end of repositories:

allprojects {
	repositories {
		...
		maven { url 'https://jitpack.io' }
	}
}

Step 2. Add the dependency

dependencies {
        implementation 'com.github.sad-adnan:customToast:v1.3'
}

Use Case

From version 1.1 you have default value of toast as Toast>LENGTH_SHORT so you can just give one parameter (2nd one) less, if you need short length.

CustomToast.ShowSuccessToast(MainActivity.this,"Congratulations"); // 2nd parameter DEFAULT value false --> Toast.LENGTH_SHORT

you can show a success message by using below code :

    CustomToast.ShowSuccessToast(MainActivity.this,false,"Congratulations"); // 2nd parameter true --> Toast.LENGTH_LONG  , false --> Toast.LENGTH_SHORT

you can show a Error message by using below code :

    CustomToast.ShowErrorToast(MainActivity.this,false,"We are extremely sorry."); // 2nd parameter true --> Toast.LENGTH_LONG  , false --> Toast.LENGTH_SHORT

you can show a Info message by using below code :

    CustomToast.ShowInfoToast(MainActivity.this,false,"We have updated your status."); // 2nd parameter true --> Toast.LENGTH_LONG  , false --> Toast.LENGTH_SHORT

you can show a custom Toast message with icon and message by using below code :

you have to pass drawable resource id (R.drawable.yourdrawable) and color id (R.color.yourcolor) in 4th and 5th Parameter respectively
    CustomToast.showToastWithCustomDrawableAndBG(MainActivity.this,false,"Custom Icon",R.drawable.ic_baseline_auto_delete_24,R.color.toastColor); // 2nd parameter true --> Toast.LENGTH_LONG  , false --> Toast.LENGTH_SHORT
    CustomToast.showToastWithoutIcon(MainActivity.this,false,"Without icon",R.color.toastColor2); // this method will only show text, without any drawable , 2nd parameter true --> Toast.LENGTH_LONG  , false --> Toast.LENGTH_SHORT

You might also like...
Client App to show the information of the searched Pokemon
Client App to show the information of the searched Pokemon

PokemonSearch Client App to show the information of the searched Pokemon. It uses Pokemon SDK to show all the information. How to use it. Set up Take

A simple App which fetches data from NewYork times api and show news to the user
A simple App which fetches data from NewYork times api and show news to the user

Stay-TheNewsApp This is a simple java app, which fetches data from NewYork times api and show news to the user, News can be seen from various categori

BooksApp - Show the books list from an API with using retrofit2, picasso and JSON libraries
BooksApp - Show the books list from an API with using retrofit2, picasso and JSON libraries

BooksApp Books App Show the books list from an API with using retrofit2, picasso

Demo to show ongoing notification on Huawei P50 Pocket
Demo to show ongoing notification on Huawei P50 Pocket

Bali Demo Demo code to show different ongoing notification types on the Huawei P50 Pocket external screen. Currently the external screen provides THRE

A basic application to show list of recently posted questions on stackoverflow
A basic application to show list of recently posted questions on stackoverflow

android-stackexchange-api-demo A basic application to show list of recently posted questions on stackoverflow Main screen This is the main screen whic

 Astronomy Picture of the Day Nasa(APOD) media listing and show picture details.
Astronomy Picture of the Day Nasa(APOD) media listing and show picture details.

Astronomy Picture of the Day Nasa(APOD) media listing and show picture details. Built to learn and use of Latest Android development libs using Coroutines, Flow, Dagger-Hilt, Architecture Components, MVVM, Room, Retrofit, Material Guideline)

A movie & TV show exploration app that implements MVVM design pattern by following the clean architecture principles, using TMDB API.
A movie & TV show exploration app that implements MVVM design pattern by following the clean architecture principles, using TMDB API.

🎬 Movie App 📺 A movie & TV show exploration app that implements MVVM design pattern by following the clean architecture principles, using TMDB API.

Ticker - A custom time picker library
Ticker - A custom time picker library

Ticker A simple spinner time picker library Adding dependencies: if your gradle

Android Custom View Accessibility

CustomFanController - Solution Code Creates a circular fan control dial that offers multiple selections marked by numeric indicators: 0 for off, 1 for

Releases(v1.3)
Owner
MD. Sad Adnan
MD. Sad Adnan
Send Whatsapp Message Without Saving Mobile Number

Send Whatsapp Message Without Saving Mobile Number In this project i created the

THANGADURAI SELVARAJ 2 Apr 22, 2022
A backend service that generates a random 32-chars length message and its sha256 hashcode and put them to DB

This is an Android application in which a user can ask the server to generate a random message and its sha256, and ask to obtain this info from the server.

Iskander 1 Nov 20, 2022
Kafka Connect JSLT Single Message Transform

This is an implementation of the Kafka Connect SMT interface to offer transformation capabilities using the Schibsted JSLT library.

willhaben 2 May 25, 2022
This application is used to adjust the scaling of kubernetes deployments depending on the message-count of given RabbitMQ queues.

PodAutoScaler This application is used to adjust the scaling of kubernetes deployments depending on the message-count of given RabbitMQ queues. It use

Max.-F. Helm 7 May 9, 2022
AppD-Task1 - A simple basic app with use of card view and toast

AppD-Task1 Made a simple basic app with use of card view and toast. Screenshots

Akshat Singh 0 Jan 29, 2022
This Kotlin Multiplatform library is for accessing the TMDB API to get movie and TV show content. Using for Android, iOS, and JS projects.

Website | Forum | Documentation | TMDb 3 API Get movie and TV show content from TMDb in a fast and simple way. TMDb API This library gives access to T

Moviebase 37 Dec 29, 2022
A project to show the best way to build an Android app on 2022 (by me).

Hello Architecture I create this project to show what's for me the best way to build an Android app on 2022. Architecture I use this diagram as and id

Martín Fernández 3 Dec 14, 2022
An Online Meme Sharing app with swipeable vidoes, user can like, share different videos, each viewpager item has one video to show.

MemesSharing An Online Meme Sharing app with swipeable vidoes, user can like, share different videos, each viewpager item has one video to show. 1. Fl

Vikas Bajpayee 13 Aug 6, 2022
myMaps displays a list of maps, each of which show user-defined markers with a title, description, and location.

My Maps Trevor Carrell myMaps displays a list of maps, each of which show user-defined markers with a title, description, and location. The user can a

null 0 Nov 1, 2021