[charter]

[3.2.0]
[自定义吐司]
This commit is contained in:
yangyakun
2023-05-22 19:25:42 +08:00
parent 8219a95d08
commit 2aaa87b1ab
6 changed files with 99 additions and 0 deletions

View File

@@ -453,6 +453,26 @@ public final class ToastUtils {
show(UtilsBridge.format(format, args), Toast.LENGTH_LONG, DEFAULT_MAKER);
}
/**
* Show the toast for a short period of time.
*
*/
public static void showShort(@Nullable final View view) {
if(view!=null){
show(view, Toast.LENGTH_SHORT, DEFAULT_MAKER);
}else {
}
}
/**
* Show the toast for a short period of time.
*
*/
public static void showLong(@Nullable final View view) {
show(view, Toast.LENGTH_LONG, DEFAULT_MAKER);
}
/**
* Cancel the toast.
*/