Skip to content

Commit

Permalink
modify code in showWithCallback(boolean successVisible)
Browse files Browse the repository at this point in the history
  • Loading branch information
KingJA committed Mar 20, 2018
1 parent 25eb053 commit a4ce9bb
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 7 deletions.
2 changes: 1 addition & 1 deletion README-cn.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ LoadSir的使用,只需要简单的三步
### 添加依赖

```groovy
compile 'com.kingja.loadsir:loadsir:1.3.5'
compile 'com.kingja.loadsir:loadsir:1.3.6'
```

### 第一步:配置
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ LoadSir only needs 3 steps: **1. Config** -> **2. Register** -> **3. Display**
### Download

```groovy
compile 'com.kingja.loadsir:loadsir:1.3.5'
compile 'com.kingja.loadsir:loadsir:1.3.6'
```

### Step 1: Config
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ protected void onCreate(@Nullable Bundle savedInstanceState) {
LoadSir loadSir = new LoadSir.Builder()
.addCallback(new EmptyCallback())
.addCallback(new AnimateCallback())
.setDefaultCallback(EmptyCallback.class)
.setDefaultCallback(AnimateCallback.class)
.build();
loadService = loadSir.register(this, new Callback.OnReloadListener() {
@Override
Expand All @@ -55,5 +55,6 @@ public void run() {
}).start();
}
});
PostUtil.postCallbackDelayed(loadService, EmptyCallback.class, 1000);
}
}
4 changes: 2 additions & 2 deletions config.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ ext {
minSdkVersion = 14
targetSdkVersion = 26

versionCode = 20171231
versionName = "1.3.5"
versionCode = 20180320
versionName = "1.3.6"
supportVersion = '26.0.0-alpha1'
}
4 changes: 4 additions & 0 deletions docs/changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
Changelog
---

**1.3.6**
- [x] modify code in`showWithCallback(boolean successVisible)`, use INVISIBLE instead of GONE thanks @X

**1.3.5**
- [x] add API `public Class<? extends Callback> getCurrentCallback()`
- [x] deprecated API `public LinearLayout getTitleLoadLayout(Context context, ViewGroup rootView, View titleView)`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,15 @@ protected int onCreateView() {
* @deprecated Use {@link #showWithCallback(boolean successVisible)} instead.
*/
public void hide() {
obtainRootView().setVisibility(View.GONE);
obtainRootView().setVisibility(View.INVISIBLE);
}

public void show() {
obtainRootView().setVisibility(View.VISIBLE);
}

public void showWithCallback(boolean successVisible) {
obtainRootView().setVisibility(successVisible ? View.VISIBLE : View.GONE);
obtainRootView().setVisibility(successVisible ? View.VISIBLE : View.INVISIBLE);
}

}

0 comments on commit a4ce9bb

Please sign in to comment.