开源软件名称(OpenSource Name):SwiftyWang/ToastBar开源软件地址(OpenSource Url):https://github.com/SwiftyWang/ToastBar开源编程语言(OpenSource Language):Java 100.0%开源软件介绍(OpenSource Introduction):Material Design Top/Bottom Toast Bar. Min SDK >= 14Support Android 10How to implementAdd it in your root build.gradle at the end of repositories: allprojects {
repositories {
...
maven { url "https://jitpack.io" }
}
} Step 2. Add the dependency dependencies {
implementation 'com.github.SwiftyWang:TopToastBar:1.1.7'
} Support in the application or in the window. Toast style to use: with container view: public void onBottomToast(View view) {
BottomToast.make((ViewGroup) findViewById(R.id.parent), "HELLO WORLD!!!!", 3000).show();
}
public void onTopToast(View view) {
TopToast.make((ViewGroup) findViewById(R.id.parent), "HELLO WORLD!!!!", 3000).show();
} without container view(attach as overlay) public void onBottomToast(View view) {
BottomToast.make(context, "HELLO WORLD!!!!", 3000).show();
}
public void onTopToast(View view) {
TopToast.make(context, "HELLO WORLD!!!!", 3000).show();
} all public apis: setAnimationInterpolator(Interpolator enterInterpolator, Interpolator exitInterpolator);
setPosition(Position position);
setText(String text);
setTime(long time);
show(long delay);
show();
setBackground();
setTextColor(); ToDo List
|
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论