Skip to content
This repository has been archived by the owner on Nov 9, 2017. It is now read-only.

Undoviewheight #314

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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'
}
}
Expand Down
4 changes: 2 additions & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down