Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
jiang111 authored Apr 28, 2020
1 parent 63f5fd7 commit a0e4065
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -769,6 +769,30 @@ configurations.all {

* Android library中的混淆需要使用consumerProguardFiles来配置,而不是proguardFiles


* ViewPager结合SwipeRefreshLayout的时候,建议对ViewPager添加如下代码:
```
viewpager.addOnPageChangeListener(new ViewPager.OnPageChangeListener() {
@Override
public void onPageScrolled(int position, float positionOffset, int positionOffsetPixels) {
}
@Override
public void onPageSelected(int position) {
}
@Override
public void onPageScrollStateChanged(int state) {
//禁止swipeRefreshLayout拿上下滑动的手势
swipeRefreshLayout.setEnabled(state == ViewPager.SCROLL_STATE_IDLE);
}
});
```


#### 摘自[如下地址](https://github.com/jiang111/awesome-android-tips/blob/master/Authors.md)


Expand Down

0 comments on commit a0e4065

Please sign in to comment.