File tree 3 files changed +8
-8
lines changed
app/src/main/java/com/lopez/toast
3 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -77,9 +77,9 @@ allprojects {
77
77
在你app的gradle里面添加:
78
78
</br ></br >
79
79
80
- dependencies {
81
- implementation 'com.github.YMLopez:ToastUtils:1.0.0 '
82
- }
80
+ implementation('com.github.YMLopez:ToastUtils:1.0.2') {
81
+ exclude group: 'com.android.support '
82
+ }
83
83
84
84
</br ></br >
85
85
Original file line number Diff line number Diff line change 1
1
package com .lopez .toast ;
2
2
3
- import android .support . v7 . app .AppCompatActivity ;
3
+ import android .app .Activity ;
4
4
import android .os .Bundle ;
5
5
import android .view .View ;
6
6
7
7
8
8
9
- public class MainActivity extends AppCompatActivity {
9
+ public class MainActivity extends Activity {
10
10
11
11
@ Override
12
12
protected void onCreate (Bundle savedInstanceState ) {
13
13
super .onCreate (savedInstanceState );
14
14
setContentView (R .layout .activity_main );
15
-
15
+ //也可以在Application中初始化
16
16
/*ToastUtils toast = ToastUtils.initToast(this);
17
17
toast.setLayout(R.layout.toast_layout_white);*/
18
18
}
19
19
20
20
public void hello (View view ) {
21
21
//ToastUtils.showToast("你好啊!");
22
22
//ToastUtils.showToast(R.string.hi, 1000);
23
- ToastUtils .showToastLong ("我很菜呀~" );
23
+ // ToastUtils.showToastLong("我很菜呀~");
24
24
}
25
25
26
26
}
Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ buildscript {
7
7
jcenter()
8
8
}
9
9
dependencies {
10
- classpath ' com.android.tools.build:gradle:3.1.3 '
10
+ classpath ' com.android.tools.build:gradle:3.1.4 '
11
11
12
12
13
13
// NOTE: Do not place your application dependencies here; they belong
You can’t perform that action at this time.
0 commit comments