Skip to content

Commit 73163d4

Browse files
author
admin
committed
改为SmartToast
1 parent 74f70a7 commit 73163d4

File tree

6 files changed

+33
-1
lines changed

6 files changed

+33
-1
lines changed

.idea/vcs.xml

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

app/build.gradle

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,9 @@ dependencies {
2626
androidTestImplementation 'com.android.support.test:runner:1.0.1'
2727
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
2828
implementation project(':twocheckboxlibrary')
29+
implementation ( 'com.github.the-pig-of-jungle:SmartShow:v1.0.2' ){
30+
//去除support包的依赖,其一,你不一定用到SmartSnackbar;其二,你项目使用的版本不一定和库中所用相同
31+
exclude group: 'com.android.support'
32+
33+
}
2934
}

app/src/main/AndroidManifest.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
package="com.pineteree.twocheckboxdemo">
44

55
<application
6+
android:name=".App"
67
android:allowBackup="true"
78
android:icon="@mipmap/ic_launcher"
89
android:label="@string/app_name"
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
package com.pineteree.twocheckboxdemo;
2+
3+
import android.app.Application;
4+
5+
import com.coder.zzq.smartshow.toast.SmartToast;
6+
7+
/**
8+
* Created by Administrator on 2018/1/17.
9+
*/
10+
11+
public class App extends Application {
12+
@Override
13+
public void onCreate() {
14+
super.onCreate();
15+
//使用默认布局的普通Toast
16+
SmartToast.plainToast(this);
17+
}
18+
}

app/src/main/java/com/pineteree/twocheckboxdemo/MainActivity.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
import android.os.Bundle;
55
import android.util.Log;
66

7+
import com.coder.zzq.smartshow.toast.SmartToast;
78
import com.pineteree.twocheckboxlibrary.TwoCheckbox;
89

910
public class MainActivity extends AppCompatActivity {
@@ -30,7 +31,7 @@ protected void onCreate(Bundle savedInstanceState) {
3031
public void getCheckInt(int checkInt) {
3132
// checkInt:0 左边CheckBox
3233
// checkInt:1 右边CheckBox
33-
Log.d(TAG, checkInt + "");
34+
SmartToast.show(checkInt + "");
3435
}
3536
});
3637
}

build.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ allprojects {
1919
repositories {
2020
google()
2121
jcenter()
22+
maven { url 'https://jitpack.io' }
2223
}
2324
}
2425

0 commit comments

Comments
 (0)