Skip to content

Commit

Permalink
解决之前的问题之后,整理下代码,版本升级到v1.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
huxq17 committed May 30, 2016
1 parent b5296c2 commit 56a9e48
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 1,483 deletions.
8 changes: 8 additions & 0 deletions .idea/gradle.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ dependencies {
compile 'com.android.support:cardview-v7:23.0.1'
compile 'io.realm:realm-android:0.81.1'
compile 'org.jsoup:jsoup:1.8.2'
// compile 'com.huxq17.android:SwipeCardsView:1.0.0'
compile 'com.huxq17.android:SwipeCardsView:1.1.0'
compile 'com.android.support:appcompat-v7:23.0.1'
compile project(':library')
// compile project(':library')
compile project(':okhttp')
}
2 changes: 1 addition & 1 deletion library/gradle.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
VERSION_NAME=1.0.0
VERSION_NAME=1.1.0
GROUP=com.huxq17.android
POM_NAME=SwipeCardsView
POM_ARTIFACT_ID=SwipeCardsView
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -288,11 +288,9 @@ public boolean dispatchTouchEventSupper(MotionEvent e) {
private void releaseTopView(float xvel, float yvel) {
mScrolling = true;
View topView = getTopView();
LogUtil.i("test start releaseTopView topView=" + topView);
if (topView != null) {
onTopViewReleased(topView, xvel, yvel);
}
LogUtil.i("test end releaseTopView topView=" + topView);

}

Expand Down Expand Up @@ -429,8 +427,6 @@ protected void onLayout(boolean changed, int left, int top, int right, int botto
initLeft = viewList.get(0).getLeft();
initTop = viewList.get(0).getTop();
mCardWidth = viewList.get(0).getMeasuredWidth();
View topView = getTopView();
LogUtil.i("test onLayout initLeft=" + initLeft + "; topView=" + topView);
}

@TargetApi(Build.VERSION_CODES.JELLY_BEAN_MR1)
Expand Down Expand Up @@ -640,12 +636,10 @@ private void onTopViewReleased(View changedView, float xvel, float yvel) {
finalX = mWidth;
finalY = dy * (mCardWidth + initLeft) / dx + initTop;
flyType = SlideType.RIGHT;
LogUtil.i("test 向右边滑出");
} else if (dx < -X_DISTANCE_THRESHOLD || (xvel < -X_VEL_THRESHOLD && dx < 0)) {//向左边滑出
finalX = -mCardWidth;
finalY = dy * (mCardWidth + initLeft) / (-dx) + dy + initTop;
flyType = SlideType.LEFT;
LogUtil.i("test 向左边滑出");
}

if (finalY > mHeight) {
Expand Down
Loading

0 comments on commit 56a9e48

Please sign in to comment.