Skip to content
This repository was archived by the owner on Jan 8, 2022. It is now read-only.

Commit 7d0941b

Browse files
committed
完善loading代码
1 parent 997864a commit 7d0941b

3 files changed

Lines changed: 11 additions & 5 deletions

File tree

app/src/main/java/com/xiasuhuei321/sample/MainActivity.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,6 @@ private void initView() {
5757

5858
@Override
5959
protected void handleMessage(Message msg) {
60-
super.handleMessage(msg);
6160
switch (msg.what) {
6261
case LOAD_SUCCESS:
6362
ld.loadSuccess();

app/src/main/java/com/xiasuhuei321/sample/base/BaseLoadingActivity.java

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,22 @@ public class BaseLoadingActivity extends AppCompatActivity {
2222
protected Handler h = new Handler() {
2323
@Override
2424
public void handleMessage(Message msg) {
25-
super.handleMessage(msg);
26-
handleMessage(msg);
25+
BaseLoadingActivity.this.handleMessage(msg);
2726
}
2827
};
2928

3029
protected void handleMessage(Message msg) {
3130

3231
}
3332

33+
protected void showLoading() {
34+
ld.show();
35+
}
36+
37+
protected void dismissLoading() {
38+
ld.close();
39+
}
40+
3441
@Override
3542
protected void onDestroy() {
3643
super.onDestroy();

gradle.properties

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ org.gradle.jvmargs=-Xmx1536m
1111
# This option should only be used with decoupled projects. More details, visit
1212
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
1313
# org.gradle.parallel=true
14-
COMPILESDKVERSION=28
14+
COMPILESDKVERSION=26
1515
MINSDKVERSION=14
1616
TARGETSDKVERSION=27
1717
VERSION_CODE=1
18-
SUPPORTVERSION=28.0.0
18+
SUPPORTVERSION=27.0.0
1919
VERSION_NAME=1.0.0

0 commit comments

Comments
 (0)