Skip to content

Commit

Permalink
make smoothSlide method public
Browse files Browse the repository at this point in the history
  • Loading branch information
zpauly committed Nov 21, 2016
1 parent 42c47a2 commit 2239d4a
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 9 deletions.
4 changes: 0 additions & 4 deletions app/src/main/java/com/zpauly/app/SlideFragment.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,7 @@
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.MenuItem;
import android.view.View;
import android.view.ViewGroup;

Expand Down
1 change: 0 additions & 1 deletion app/src/main/res/layout/fragment_slide.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
<com.zpauly.swipeLayout.SlideLayout
app:layout_behavior="@string/appbar_scrolling_view_behavior"
android:id="@+id/sl_layout"
android:padding="10dp"
android:layout_width="match_parent"
android:layout_height="match_parent">

Expand Down
8 changes: 4 additions & 4 deletions library/src/main/java/com/zpauly/swipeLayout/SlideLayout.java
Original file line number Diff line number Diff line change
Expand Up @@ -269,8 +269,8 @@ private void computeBackContent() {
}
}

private boolean horizontalSmoothSlideTo(View child, int aimPosition) {
if (hasNoLayout) {
public boolean horizontalSmoothSlideTo(View child, int aimPosition) {
if (hasNoLayout && (mSlideDirection == DIRECTION_LEFT || mSlideDirection == DIRECTION_RIGHT)) {
return false;
}
if (mDragHelper.smoothSlideViewTo(child, aimPosition, childPaddingTop)) {
Expand All @@ -280,8 +280,8 @@ private boolean horizontalSmoothSlideTo(View child, int aimPosition) {
return false;
}

private boolean verticalSmoothSlideTo(View child, int aimPosition) {
if (hasNoLayout) {
public boolean verticalSmoothSlideTo(View child, int aimPosition) {
if (hasNoLayout && (mSlideDirection == DIRECTION_DOWN || mSlideDirection == DIRECTION_UP)) {
return false;
}
if (mDragHelper.smoothSlideViewTo(child, childPaddingLeft, aimPosition)) {
Expand Down

0 comments on commit 2239d4a

Please sign in to comment.