File tree Expand file tree Collapse file tree 5 files changed +21
-17
lines changed Expand file tree Collapse file tree 5 files changed +21
-17
lines changed Original file line number Diff line number Diff line change 66
77* 已投入公司项目多时,没有任何毛病,可胜任任何需求,[ 点击此处下载Demo] ( ToastUtils.apk )
88
9- ![ ] ( ToastUtils.gif )
10-
11- #### 本框架意在解决一些常见需求,如果是有一些特殊的需求推荐配搭 [ XToast] ( https://github.com/getActivity/XToast ) 悬浮窗使用
9+ ![ ] ( ToastUtils.jpg )
1210
1311#### 集成步骤
1412
13+ * 在项目根目录下的 ` build.gradle ` 文件中加入
14+
15+ ``` groovy
16+ buildscript {
17+ ......
18+ }
19+ allprojects {
20+ repositories {
21+ // JitPack 远程仓库:https://jitpack.io
22+ maven { url 'https://jitpack.io' }
23+ }
24+ }
25+ ```
26+
27+ * 在项目 app 模块下的 ` build.gradle ` 文件中加入
28+
1529``` groovy
1630android {
1731 // 支持 JDK 1.8
@@ -23,11 +37,11 @@ android {
2337
2438dependencies {
2539 // 吐司框架:https://github.com/getActivity/ToastUtils
26- implementation 'com.hjq:toast :9.0'
40+ implementation 'com.github.getActivity:ToastUtils :9.0'
2741}
2842```
2943
30- #### 初始化
44+ #### 初始化框架
3145
3246``` java
3347ToastUtils . init(this );
@@ -42,7 +56,6 @@ ToastUtils.show("我是吐司");
4256#### 取消 Toast
4357
4458``` java
45- // 取消 Toast 显示
4659ToastUtils . cancel();
4760```
4861
@@ -131,6 +144,8 @@ Toast.makeText
131144new Toast
132145```
133146
147+ #### 温馨提示:框架意在解决一些常规的 Toast 需求,如果是有一些特殊的定制化需求请配搭 [XToast ](https: // github.com/getActivity/XToast) 悬浮窗框架使用
148+
134149#### 作者的其他开源项目
135150
136151* 安卓技术中台:[AndroidProject ](https: // github.com/getActivity/AndroidProject)
Original file line number Diff line number Diff line change @@ -7,7 +7,6 @@ buildscript {
77 }
88 dependencies {
99 classpath ' com.android.tools.build:gradle:3.4.0'
10- classpath ' com.novoda:bintray-release:0.9.2'
1110 }
1211}
1312
Original file line number Diff line number Diff line change 11apply plugin : ' com.android.library'
2- apply plugin : ' com.novoda.bintray-release'
32
43android {
54 compileSdkVersion 30
@@ -17,15 +16,6 @@ android {
1716 }
1817}
1918
20- publish {
21- userOrg = ' getactivity'
22- groupId = ' com.hjq'
23- artifactId = ' toast'
24- publishVersion = ' 9.0'
25- desc = ' This is a very functional Toast'
26- website = " https://github.com/getActivity/ToastUtils"
27- }
28-
2919tasks. withType(Javadoc ) {
3020 options. addStringOption(' Xdoclint:none' , ' -quiet' )
3121 options. addStringOption(' encoding' , ' UTF-8' )
You can’t perform that action at this time.
0 commit comments