Description
RTL Toasr Library
RTL-Toast alternatives and similar packages
Based on the "Toast Widget" category.
Alternatively, view RTL-Toast alternatives based on common mentions on social networks and blogs.
-
Android-AppMsg
In-layout notifications. Based on Toast notifications and article by Cyril Mottier (http://android.cyrilmottier.com/?p=773). -
FloatingToast-Android
Android library to create customizable floating animated toasts like in Clash Royale app -
CoolToast
A really simple library that help you to display a custom toast with many colors (for : success, warning, danger, info, dark, light, primary...etc ), or with rounded corners, or event with image.
CodeRabbit: AI Code Reviews for Developers
* Code Quality Rankings and insights are calculated and provided by Lumnify.
They vary from L1 to L5 with "L5" being the highest.
Do you think we are missing an alternative of RTL-Toast or a related project?
README
RTL-Toast
Android library to show Toasts in a pretty RTL way
[ScreenShot](./assets/template.jpg)
Install
Add it in your root build.gradle
allprojects {
repositories {
...
maven {
url 'https://jitpack.io'
}
}
}
Add the dependency
dependencies {
implementation 'com.github.hatamiarash7:RTL-Toast:1.3'
}
Usage
RTLToast.error(context, message, length, withIcon);
RTLToast.success(context, message, length, withIcon);
RTLToast.info(context, message, length, withIcon);
RTLToast.warning(context, message, length, withIcon);
RTLToast.normal(context, message, length, withIcon);
You can use formatted strings
RTLToast.info(context, getFormattedMessage())
private CharSequence getFormattedMessage() {
final String prefix = "متن ";
final String highlight = "با فرمت ";
final String suffix = " مخصوص";
SpannableStringBuilder ssb = new SpannableStringBuilder(prefix).append(highlight).append(suffix);
int prefixLen = prefix.length();
ssb.setSpan(new StyleSpan(BOLD_ITALIC), prefixLen, prefixLen + highlight.length(), Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
return ssb;
}
Or you can customize your toast with RTLToast.Config
RTLToast.Config.getInstance()
.setTextColor(Color.GREEN)
.setToastTypeface(Typeface.createFromAsset(getAssets(), "IRANSans.ttf"))
.apply();
RTLToast.custom(context, message, getResources().getDrawable(R.drawable.laptop512), Color.BLACK, length, withIcon, shouldTint).show();
RTLToast.Config.reset();
Support
Contributing
- Fork it!
- Create your feature branch :
git checkout -b my-new-feature
- Commit your changes :
git commit -am 'Add some feature'
- Push to the branch :
git push origin my-new-feature
- Submit a pull request :D
Issues
Each project may have many problems. Contributing to the better development of this project by reporting them
License
*Note that all licence references and agreements mentioned in the RTL-Toast README section above
are relevant to that project's source code only.