Skip to content

An impressive and versatile Kotlin-based Android library is here to elevate your app experience with its stunning 🎨 and multi-functional ⚑ Awesome Toast 🍞 component! πŸš€

License

Notifications You must be signed in to change notification settings

Vibhav00/awesometoast

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

6 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Awesome Toast - Stylish Kotlin Toast Library for Android. πŸ”₯πŸ˜πŸ’–

platform API GitHub license

A Stylish Kotlin Toast Library for Android Apps πŸ˜πŸ€—

GitHub Cards Preview

Preview - Awesome Toast 🌟🌟🌟

Types of Toast 😍

Success Toast Warning Toast Failure Toast Default Toast

About

An impressive and versatile Kotlin-based Android library is here to elevate your app experience with its stunning and multi-functional Awesome Toast component.

Dependency Project Level

Step 1. Add the JitPack repository to your build file

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

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

if this shows Error in your android studio paste this

	allprojects {
		repositories {
			...
			    maven { url = uri("https://www.jitpack.io" ) }
		}
	}

Dependency App Level

Add dependency in your app module

	dependencies {
	         implementation 'com.github.Vibhav00:awesometoast:1.0.0'
	}

Eight Toast Types 🎱

        1. TOAST_SUCCESS
        3. TOAST_WARNING
        5. TOAST_DELETE
        2. TOAST_ERROR
        4. TOAST_INFO
        6. TOAST_NO_INTERNET
        7. TOAST_PERMISSIONS_REQUIRED
        8. TOAST_DEFAULT

Toast Duration βŒ›οΈ

        1. LENGTH_LONG // 3 Seconds
        2. LENGTH_SHORT // 2 Seconds

Usage

Sample Code for - Awesome Toast πŸŒŸπŸ€—πŸ€©

Success Toast πŸŽ‰πŸ†πŸŒŸ

  AwesomeToast.createToast(
                    this@MainActivity,
                    "Successfully Saved 😊 ",
                    "Your item was saved successfully ",
                    Toast.LENGTH_SHORT,
                    AwesomeToastStyles.SUCCESS,
                )

Warning Toast βš οΈπŸš¨β›”

  AwesomeToast.createToast(
                    this@MainActivity,
                    "Provide strong password ⚠️ ",
                    "password must contain one number ",
                    Toast.LENGTH_SHORT,
                    AwesomeToastStyles.WARNING,
                )


Delete Toast βŒπŸ—‘οΈπŸ”₯

      AwesomeToast.createToast(
                    this@MainActivity,
                    "Item Deleted πŸ—‘οΈ",
                    "item was  deleted ",
                    Toast.LENGTH_SHORT,
                    AwesomeToastStyles.DELETE,
                )

Error Toast ❌⚠️🚫

 AwesomeToast.createToast(
                    this@MainActivity,
                    "Failed to Save πŸ™",
                    "Error while saving the item  ",
                    Toast.LENGTH_SHORT,
                    AwesomeToastStyles.ERROR,
                )


Info Toast πŸ’‘πŸ“‹β„ΉοΈ

       AwesomeToast.createToast(
                    this@MainActivity,
                    "Please Enter Email πŸ’‘ ",
                    "Email Should not be Empty ",
                    Toast.LENGTH_SHORT,
                    AwesomeToastStyles.INFO,
                )

No Internet Toast πŸ“΅πŸŒπŸš«

       AwesomeToast.createToast(
                    this@MainActivity,
                    "Connection Problem  🌐",
                    "internet or wifi is not available ",
                    Toast.LENGTH_SHORT,
                    AwesomeToastStyles.NO_INTERNET,
                )

Permission Required Toast πŸ”’πŸ“πŸ›‘

   AwesomeToast.createToast(
                    this@MainActivity,
                    "Permission Required πŸ”’",
                    "Permission for internet is Required ",
                    Toast.LENGTH_SHORT,
                    AwesomeToastStyles.PERMISSION_REQUIRED,
                )

Default Toast πŸ”„πŸ“œπŸ†—

     AwesomeToast.createToast(
                    this@MainActivity,
                    "Hello Everyone πŸ–",
                    "Welcome to this app ",
                    Toast.LENGTH_SHORT,
                    AwesomeToastStyles.DEFAULT,
                )

License



Copyright Β© 2024 Vibhav Kumar

This file is licensed under the Apache License, Version 2.0. You are permitted to use this file only in accordance with the terms of the License. You may obtain a copy of the License at:

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.




About

An impressive and versatile Kotlin-based Android library is here to elevate your app experience with its stunning 🎨 and multi-functional ⚑ Awesome Toast 🍞 component! πŸš€

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages