6 Star 8 Fork 1

HarmonyOS-TPC / Toasty

加入 Gitee
与超过 800 万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README.md

Gradle Dependency

implementation "io.openharmony.tpc.thirdlib:Toasty:1.0.1"

Toasty

The usual Toast, but with steroids.

Usage

To display an error Toast:

Toasty.error(yourContext, "This is an error toast.", Toast.LENGTH_SHORT, true);

To display a success Toast:

Toasty.success(yourContext, "Success!", Toast.LENGTH_SHORT, true);

To display an info Toast:

Toasty.info(yourContext, "Here is some info for you.", Toast.LENGTH_SHORT, true);

To display a warning Toast:

Toasty.warning(yourContext, "Beware of the dog.", Toast.LENGTH_SHORT, true);

To display the usual Toast:

Toasty.normal(yourContext, "Normal toast w/o icon");

To display the usual Toast with icon:

Toasty.normal(yourContext, "Normal toast w/ icon", yourIconDrawable);

You can also create your custom Toasts with the custom() method:

Toasty.custom(yourContext, "I'm a custom Toast", yourIconDrawable, tintColor, duration, withIcon, 
shouldTint);

简介

The usual Toast, but with steroids. 展开 收起
Java
LGPL-3.0
取消

发行版

暂无发行版

Toasty

贡献者

全部

近期动态

加载更多
不能加载更多了
1
https://gitee.com/HarmonyOS-tpc/Toasty.git
git@gitee.com:HarmonyOS-tpc/Toasty.git
HarmonyOS-tpc
Toasty
Toasty
master

搜索帮助