From 2b4f987e26226027007a48a3d11162f5bfaa67c2 Mon Sep 17 00:00:00 2001 From: "Giuseppe Buzzanca (PiDy)" Date: Mon, 15 Dec 2014 00:07:23 +0100 Subject: [PATCH 1/2] Switch to grandle plugin 1.0.0 --- build.gradle | 2 +- gradle/wrapper/gradle-wrapper.properties | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/build.gradle b/build.gradle index a4110277..87def50f 100644 --- a/build.gradle +++ b/build.gradle @@ -20,7 +20,7 @@ buildscript { } dependencies { - classpath 'com.android.tools.build:gradle:0.12.2' + classpath 'com.android.tools.build:gradle:1.0.0' classpath 'org.ajoberstar:gradle-git:0.9.0' } } diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 37e9a177..97e0cf50 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ -#Sat Jun 14 10:45:24 CEST 2014 +#Mon Dec 15 00:02:40 CET 2014 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=http\://services.gradle.org/distributions/gradle-1.12-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-2.2.1-all.zip From 6e1e9f8af5dd9ccead995aaa9661fcdf0738bd57 Mon Sep 17 00:00:00 2001 From: "Giuseppe Buzzanca (PiDy)" Date: Mon, 15 Dec 2014 01:52:41 +0100 Subject: [PATCH 2/2] Fixed: The undo view modifies the primary view height --- .../swipedismiss/undo/SimpleSwipeUndoAdapter.java | 4 ++-- .../swipedismiss/undo/SwipeUndoTouchListener.java | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib-manipulation/src/main/java/com/nhaarman/listviewanimations/itemmanipulation/swipedismiss/undo/SimpleSwipeUndoAdapter.java b/lib-manipulation/src/main/java/com/nhaarman/listviewanimations/itemmanipulation/swipedismiss/undo/SimpleSwipeUndoAdapter.java index 836295db..956ac2b5 100644 --- a/lib-manipulation/src/main/java/com/nhaarman/listviewanimations/itemmanipulation/swipedismiss/undo/SimpleSwipeUndoAdapter.java +++ b/lib-manipulation/src/main/java/com/nhaarman/listviewanimations/itemmanipulation/swipedismiss/undo/SimpleSwipeUndoAdapter.java @@ -57,7 +57,7 @@ public class SimpleSwipeUndoAdapter extends SwipeUndoAdapter implements UndoCall /** * Create a new {@code SimpleSwipeUndoAdapterGen}, decorating given {@link android.widget.BaseAdapter}. * - * @param undoAdapter the {@link android.widget.BaseAdapter} that is decorated. Must implement + * @param adapter the {@link android.widget.BaseAdapter} that is decorated. Must implement * {@link com.nhaarman.listviewanimations.itemmanipulation.swipedismiss.undo.UndoAdapter}. * @param context the {@link android.content.Context}. * @param dismissCallback the {@link com.nhaarman.listviewanimations.itemmanipulation.swipedismiss.OnDismissCallback} that is notified of dismissed items. @@ -99,7 +99,7 @@ public View getView(final int position, @Nullable final View convertView, @NonNu mUndoAdapter.getUndoClickView(undoView).setOnClickListener(new UndoClickListener(view, position)); boolean isInUndoState = mUndoPositions.contains(position); - primaryView.setVisibility(isInUndoState ? View.GONE : View.VISIBLE); + primaryView.setVisibility(isInUndoState ? View.INVISIBLE : View.VISIBLE); undoView.setVisibility(isInUndoState ? View.VISIBLE : View.GONE); return view; diff --git a/lib-manipulation/src/main/java/com/nhaarman/listviewanimations/itemmanipulation/swipedismiss/undo/SwipeUndoTouchListener.java b/lib-manipulation/src/main/java/com/nhaarman/listviewanimations/itemmanipulation/swipedismiss/undo/SwipeUndoTouchListener.java index 628a9e6f..3a31e597 100644 --- a/lib-manipulation/src/main/java/com/nhaarman/listviewanimations/itemmanipulation/swipedismiss/undo/SwipeUndoTouchListener.java +++ b/lib-manipulation/src/main/java/com/nhaarman/listviewanimations/itemmanipulation/swipedismiss/undo/SwipeUndoTouchListener.java @@ -132,12 +132,12 @@ public void dimissPending() { } /** - * Sets the visibility of the primary {@link android.view.View} to {@link android.view.View#GONE}, and animates the undo {@code View} in to view. + * Sets the visibility of the primary {@link android.view.View} to {@link android.view.View#INVISIBLE}, and animates the undo {@code View} in to view. * * @param view the parent {@code View} which contains both primary and undo {@code View}s. */ private void showUndoView(@NonNull final View view) { - mCallback.getPrimaryView(view).setVisibility(View.GONE); + mCallback.getPrimaryView(view).setVisibility(View.INVISIBLE); View undoView = mCallback.getUndoView(view); undoView.setVisibility(View.VISIBLE);