- You can use existing mixed toast (Success, Error, Warning, Info thost)
- You can change toast radius
- You can change toast background color
- You can change toast font
- You can change toast text size
- You can change toast text color
- You can add icon to toast
- You can change toast iconTint
- You can change toast duration
Add this in your build.gradle
file
allprojects {
repositories {
...
maven { url 'https://jitpack.io' }
}
}
Add this to your module's build.gradle
file
dependencies {
implementation 'com.github.FiratGURGUR:Thost:1.0'
}
MixedThost.success(MainActivity.this, "Success toast!").show();
MixedThost.eror(MainActivity.this, "Error toast!").show();
MixedThost.warning(MainActivity.this, "Warning toast!").show();
MixedThost.info(MainActivity.this, "Info toast!").show();
With thost, you can set the toast message as you wish. You just need to specify the features you want to add
Base Custom Thost:
new Thost()
.setContext(MainActivity.this)
.setTitle("Since it is clearly mentioned as 'impossible to lternative method and I clearly mentioned it as well.")
.create().thost().show();
Thost Radius :
.setRadius(25)
Thost Color :
.setColor(getColor(R.color.colorAccent))
Thost Add icon :
.setIcon(R.drawable.icon)
Thost icon tint color :
.seticonTintColor(R.color.colorPrimary)
Thost Text color :
.setTextColor(R.color.colorPrimary)
Thost Text size :
.setTextSize(9)
Thost Text font :
.setFont(R.font.fontname)
Thost duration :
.setDuration(Toast.LENGTH_LONG)