Skip to content

Commit cabda65

Browse files
author
anzewei
committed
右滑问题
1 parent 5225933 commit cabda65

File tree

5 files changed

+7
-6
lines changed

5 files changed

+7
-6
lines changed

README.md

+2-3
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@
33

44
Finish an Activity with parallax scrolling effect.
55

6-
<img width="480" height="847" src="https://github.com/anzewei/ParallaxBackLayout/blob/master/ext/v0.2.gif" />
7-
6+
[![Watch the video](https://github.com/anzewei/ParallaxBackLayout/blob/master/ext/video.png)](https://youtu.be/6da7UZh8MRk)
87
# Demo Apk
98

109
<a href="https://github.com/anzewei/ParallaxBackLayout/blob/master/ext/demo.apk?raw=true">DOWNLOAD</a>
@@ -19,7 +18,7 @@ Finish an Activity with parallax scrolling effect.
1918
- Add these lines to your build.gradle
2019

2120
``` groovy
22-
compile 'com.github.anzewei:parallaxbacklayout:1.0'
21+
compile 'com.github.anzewei:parallaxbacklayout:lastversion'
2322
```
2423

2524
## Step 2

README_ZH.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
[![Download](https://api.bintray.com/packages/anzewei/maven/com.github.anzewei/images/download.svg)](https://bintray.com/anzewei/maven/com.github.anzewei/_latestVersion)
33
仿微信的滑动返回Activity(视差滑动).
44

5-
<img width="480" height="847" src="https://github.com/anzewei/ParallaxBackLayout/blob/master/ext/v0.2.gif" />
5+
[![Watch the video](https://github.com/anzewei/ParallaxBackLayout/blob/master/ext/video.png)](https://youtu.be/6da7UZh8MRk)
66

77
# Demo Apk
88

@@ -13,7 +13,7 @@
1313
## 首先添加引用到Model的build.gradle
1414

1515
``` groovy
16-
compile 'com.github.anzewei:parallaxbacklayout:1.0'
16+
compile 'com.github.anzewei:parallaxbacklayout:lastversion'
1717
```
1818

1919
## 在application中注册ParallaxHelper

parallaxbacklayout/build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ ext {
1313
siteUrl = 'https://github.com/anzewei/ParallaxBackLayout'
1414
gitUrl = 'https://github.com/anzewei/ParallaxBackLayout.git'
1515

16-
libraryVersion = '1.0'
16+
libraryVersion = '1.1.1'
1717

1818
developerId = 'anzewei'
1919
developerName = 'An Zewei'

parallaxbacklayout/src/main/java/com/github/anzewei/parallaxbacklayout/widget/ParallaxBackLayout.java

+1
Original file line numberDiff line numberDiff line change
@@ -349,6 +349,7 @@ private void translateSlide(Canvas canvas, View child) {
349349
} else if (mEdgeFlag == EDGE_RIGHT) {
350350
int left = child.getRight() - mInsets.left;
351351
canvas.translate(left, 0);
352+
canvas.clipRect(mInsets.left, 0, getWidth(), getHeight());
352353
} else if (mEdgeFlag == EDGE_BOTTOM) {
353354
int top = child.getBottom() - getSystemBarSize();
354355
canvas.translate(0, top);

sample/src/main/java/com/github/anzewei/sample/basic/BaseActivity.java

+1
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ public class BaseActivity extends AppCompatActivity implements RadioGroup.OnChec
2222
@Override
2323
protected void onCreate(@Nullable Bundle savedInstanceState) {
2424
super.onCreate(savedInstanceState);
25+
setTitle(getClass().getSimpleName());
2526
setContentView(R.layout.content_main);
2627
mTxtContent = (TextView) findViewById(R.id.txt_content);
2728
mGroupLayout = ((RadioGroup) findViewById(R.id.rgp_layout));

0 commit comments

Comments
 (0)