Spikeysanju/MotionToast

Kotlin

๐ŸŒˆ A Beautiful Motion Toast Library for Kotlin Android

kotlinkotlin-androidkotlin-libraryandroidstudiotoastlibrarymaterial-designandroid-appandroid-libraryandroid-developmentandroid-uiandroid-sdkandroidkotlin
Star Growth
Stars
1.5k
Forks
136
Weekly Growth
+1
Issues
27
5001k1.5k
Mar 2020May 2022Jul 2024Sep 2026
README

Motion Toast - A Beautiful Toast Library for Android Kotlin ๐Ÿคฉ๐Ÿ”ฅ

platform API GitHub license GitHub stars GitHub forks Repo size GitHub follow Twitter Follow

A Beautiful Multipurpose Motion Toast Library in Android using Kotlin ๐Ÿ˜

GitHub Cards Preview

Preview - Motion Toast ๐ŸŒŸ

gif

Preview - Color Motion Toast ๐ŸŒˆ

gif

Preview - Dark Toast ๐ŸŒˆ

gif

Preview - Dark Color Toast ๐ŸŒˆ

gif

Types of Toast Style โค๏ธ

1. Motion Toast 2. Color Motion Toast 3. Dark Toast 4. Dark Color Toast

About

A Beautiful Multipurpose Motion Toast Library in Android using Kotlin.

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' }
		}
	}

Dependency App Level

Add dependency in your app module

	dependencies {
	        implementation 'com.github.Spikeysanju:MotionToast:1.4' 
	}

Five Toast Types ๐Ÿ–๐Ÿผ

        1. TOAST_SUCCESS
        2. TOAST_ERROR
        3. TOAST_WARNING
        4. TOAST_INFO
        5. TOAST_DELETE

Toast Duration โŒ›๏ธ

        1. LONG_DURATION // 4 Seconds
        2. SHORT_DURATION // 2 Seconds
       

Usage

Sample Code for - Motion Toast ๐ŸŒŸ

Success Toast

 MotionToast.createToast(this,
 		"Hurray success ๐Ÿ˜"
 		"Upload Completed successfully!",
                MotionToastStyle.SUCCESS,
                MotionToast.GRAVITY_BOTTOM,
                MotionToast.LONG_DURATION,
                ResourcesCompat.getFont(this,R.font.helvetica_regular))
                

Error Toast

 MotionToast.createToast(this,
 		    "Failed โ˜น๏ธ"
 		    "Profile Update Failed!",
                    MotionToastStyle.ERROR,
                    MotionToast.GRAVITY_BOTTOM,
                    MotionToast.LONG_DURATION,
                    ResourcesCompat.getFont(this,R.font.helvetica_regular))  

Warning Toast

MotionToast.createToast(this,"Please fill all the details!",
                    MotionToastStyle.WARNING,
                    MotionToast.GRAVITY_BOTTOM,
                    MotionToast.LONG_DURATION,
                    ResourcesCompat.getFont(this,R.font.helvetica_regular))  

        

Info Toast

       MotionToast.createToast(this,"This is information toast!",
                    MotionToastStyle.INFO,
                    MotionToast.GRAVITY_BOTTOM,
                    MotionToast.LONG_DURATION,
                    ResourcesCompat.getFont(this,R.font.helvetica_regular))  

Delete Toast

       MotionToast.createToast(this,"Delete all history!",
                    MotionToastStyle.DELETE,
                    MotionToast.GRAVITY_BOTTOM,
                    MotionToast.LONG_DURATION,
                    ResourcesCompat.getFont(this,R.font.helvetica_regular))  

Sample Code for - Color Motion Toast ๐ŸŒˆ

Success Toast

 MotionToast.createColorToast(this,"Upload Completed!",
                MotionToastStyle.SUCCESS,
                MotionToast.GRAVITY_BOTTOM,
                MotionToast.LONG_DURATION,
                ResourcesCompat.getFont(this,R.font.helvetica_regular))
                

Error Toast

 MotionToast.createColorToast(this,"Profile Update Failed!",
                    MotionToastStyle.ERROR,
                    MotionToast.GRAVITY_BOTTOM,
                    MotionToast.LONG_DURATION,
                    ResourcesCompat.getFont(this,R.font.helvetica_regular))  

Warning Toast

MotionToast.createColorToast(this,"Please fill all the details!",
                    MotionToastStyle.WARNING,
                    MotionToast.GRAVITY_BOTTOM,
                    MotionToast.LONG_DURATION,
                    ResourcesCompat.getFont(this,R.font.helvetica_regular))  

        

Info Toast

       MotionToast.createColorToast(this,"This is information toast!",
                    MotionToastStyle.INFO,
                    MotionToast.GRAVITY_BOTTOM,
                    MotionToast.LONG_DURATION,
                    ResourcesCompat.getFont(this,R.font.helvetica_regular))  

Delete Toast

       MotionToast.createColorToast(this,"Delete all history!",
                    MotionToastStyle.DELETE,
                    MotionToast.GRAVITY_BOTTOM,
                    MotionToast.LONG_DURATION,
                    ResourcesCompat.getFont(this,R.font.helvetica_regular))  

Sample Code for - Dark Toast ๐ŸŒš๐Ÿ–ค

Success Toast

 MotionToast.darkToast(this,"Upload Completed!",
                MotionToastStyle.SUCCESS,
                MotionToast.GRAVITY_BOTTOM,
                MotionToast.LONG_DURATION,
                ResourcesCompat.getFont(this,R.font.helvetica_regular))
                

Error Toast

 MotionToast.darkToast(this,"Profile Update Failed!",
                    MotionToastStyle.ERROR,
                    MotionToast.GRAVITY_BOTTOM,
                    MotionToast.LONG_DURATION,
                    ResourcesCompat.getFont(this,R.font.helvetica_regular))  

Warning Toast

MotionToast.darkToast(this,"Please fill all the details!",
                    MotionToastStyle.WARNING,
                    MotionToast.GRAVITY_BOTTOM,
                    MotionToast.LONG_DURATION,
                    ResourcesCompat.getFont(this,R.font.helvetica_regular))  

        

Info Toast

       MotionToast.darkToast(this,"This is information toast!",
                    MotionToastStyle.INFO,
                    MotionToast.GRAVITY_BOTTOM,
                    MotionToast.LONG_DURATION,
                    ResourcesCompat.getFont(this,R.font.helvetica_regular))  

Delete Toast

       MotionToast.darkToast(this,"Delete all history!",
                    MotionToastStyle.DELETE,
                    MotionToast.GRAVITY_BOTTOM,
                    MotionToast.LONG_DURATION,
                    ResourcesCompat.getFont(this,R.font.helvetica_regular))  

Sample Code for - Dark Color Toast ๐ŸŒš๐Ÿ–ค๐ŸŒˆ

Success Toast

 MotionToast.darkColorToast(this,"Upload Completed!",
                MotionToastStyle.SUCCESS,
                MotionToast.GRAVITY_BOTTOM,
                MotionToast.LONG_DURATION,
                ResourcesCompat.getFont(this,R.font.helvetica_regular))
                

Error Toast

 MotionToast.darkColorToast(this,"Profile Update Failed!",
                    MotionToastStyle.ERROR,
                    MotionToast.GRAVITY_BOTTOM,
                    MotionToast.LONG_DURATION,
                    ResourcesCompat.getFont(this,R.font.helvetica_regular))  

Warning Toast

MotionToast.darkColorToast(this,"Please fill all the details!",
                    MotionToastStyle.WARNING,
                    MotionToast.GRAVITY_BOTTOM,
                    MotionToast.LONG_DURATION,
                    ResourcesCompat.getFont(this,R.font.helvetica_regular))  

        

Info Toast

       MotionToast.darkColorToast(this,"This is information toast!",
                    MotionToastStyle.INFO,
                    MotionToast.GRAVITY_BOTTOM,
                    MotionToast.LONG_DURATION,
                    ResourcesCompat.getFont(this,R.font.helvetica_regular))  

Delete Toast

       MotionToast.darkColorToast(this,"Delete all history!",
                    MotionToastStyle.DELETE,
                    MotionToast.GRAVITY_BOTTOM,
                    MotionToast.LONG_DURATION,
                    ResourcesCompat.getFont(this,R.font.helvetica_regular))  

Donation

If this project help you reduce time to develop, you can give me a cup of coffee :)

paypal

License



    Copyright 2020 Spikey sanju

    Licensed under the Apache License, Version 2.0 (the "License");
    you may not use this file except in compliance with 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.
Related repositories
justjavac/free-programming-books-zh_CN

:books: ๅ…่ดน็š„่ฎก็ฎ—ๆœบ็ผ–็จ‹็ฑปไธญๆ–‡ไนฆ็ฑ๏ผŒๆฌข่ฟŽๆŠ•็จฟ

awesomeGNU General Public License v3.0pythonjavascript
weibo.com/justjavac
118.8k28.3k
JetBrains/kotlin

The Kotlin Programming Language.

Kotlinkotlinprogramming-language
kotlinlang.org
53.4k6.4k
lysine-dev/okhttp

A meticulous HTTP client for the JVM, Android, and GraalVM.

KotlinlibraryApache License 2.0javaandroid
lysine.dev/okhttp/
47.1k9.3k
gkd-kit/gkd

ๅŸบไบŽๆ— ้šœ็ข๏ผŒ้ซ˜็บง้€‰ๆ‹ฉๅ™จ๏ผŒ่ฎข้˜…่ง„ๅˆ™็š„่‡ชๅฎšไน‰ๅฑๅน•็‚นๅ‡ปๅฎ‰ๅ“ๅบ”็”จ | An Android APP with custom screen tapping based on Accessibility, Advanced Selectors, and Subscription Rules

KotlinappGNU General Public License v3.0androidkotlin
gkd.li
41.6k2k
yuliskov/SmartTube

Browse media content with your own rules on Android TV

JavaMavenappMIT Licenseandroidandroid-tv
smarttubeapp.github.io
32.7k2k
square/leakcanary

A memory leak detection library for Android.

KotlinlibraryApache License 2.0androidmemory-leak
square.github.io/leakcanary
30k4k
JunkFood02/Seal

๐Ÿฆญ Video/Audio Downloader for Android, based on yt-dlp

KotlinappGNU General Public License v3.0androidjetpack-compose
28.8k1.4k
NativeScript/NativeScript

โšก Write Native with TypeScript โœจ Best of all worlds (TypeScript, Swift, Objective C, Kotlin, Java, Dart). Use what you love โค๏ธ Angular, React, Solid, Svelte, Vue with: iOS (UIKit, SwiftUI), Android (View, Jetpack Compose), Flutter and you name it compatible.

TypeScriptnpmMIT Licensenativescriptandroid
nativescript.org
25.6k1.7k
mihonapp/mihon

Free and open source manga reader for Android

KotlinappApache License 2.0androidkotlin
23.5k1.5k
android/nowinandroid

A fully functional Android app built entirely with Kotlin and Jetpack Compose

KotlinappApache License 2.0androidjetpack-compose
21.8k4.6k
google/iosched

The Google I/O Android App

KotlinappApache License 2.0kotlinarchitecture
21.6k6.1k
open-ani/animeko

้›†ๆ‰พ็•ชใ€่ฟฝ็•ชใ€็œ‹็•ช็š„ไธ€็ซ™ๅผๅผนๅน•่ฟฝ็•ชๅนณๅฐ๏ผŒไบ‘ๆ”ถ่—ๅŒๆญฅ (Bangumi)๏ผŒ็ฆป็บฟ็ผ“ๅญ˜๏ผŒBitTorrent๏ผŒๅผนๅน•ไบ‘่ฟ‡ๆปคใ€‚100% Kotlin/Compose Multiplatform

KotlinGNU Affero General Public License v3.0animecompose
animeko.org
20k563