CustomToast
CustomToast copied to clipboard
Colorful custom android toast library.
CustomToast
Custom toast library
| Success Toast | Error Toast | Info Toast |
|---|---|---|
![]() |
![]() |
![]() |
| Warning Toast | Normal Toast | Custom icon Toast |
|---|---|---|
![]() |
![]() |
![]() |
How to add dependency?
gradle
allprojects {
repositories {
maven { url "https://jitpack.io" }
}
}
then add the library to dependency
dependencies {
implementation 'com.github.ytam:CustomToast:1.1.3'
}
Usage for success toast message
CustomToast.success(this, "This is success message",Toast.LENGTH_SHORT);
Usage for error toast message
CustomToast.error(this, "This is error message",Toast.LENGTH_LONG);
Usage for info toast message
CustomToast.info(this, "This is info message",Toast.LENGTH_LONG);
Usage for warning toast message
CustomToast.warning(this, "This is warning message",Toast.LENGTH_LONG);
Usage for normal toast message
CustomToast.normal(this, "This is normal message",Toast.LENGTH_LONG);
Usage for custom icon and background color toast message
CustomToast.iconToast(this,"This is custom icon toast", Toast.LENGTH_LONG, Color.parseColor("#6d4c41"),R.drawable.your_icon_path);
License
MIT License
Copyright (c) 2018 Yıldırım Tam
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.





