Adding drag handle allows swipe to remove.

Turns out all we needed was a drag handle to allow swipe to remove.

This still needs further testing, but is looking pretty good.

Will add an undo feature shortly.
This commit is contained in:
Tom Hennen 2015-04-03 10:29:49 -04:00
parent 1a63f26de4
commit b8d25d4123
2 changed files with 3 additions and 3 deletions

View File

@ -16,7 +16,8 @@
android:paddingBottom="@dimen/list_vertical_padding"
android:clipToPadding="false"
dslv:collapsed_height="2dp"
dslv:drag_enabled="false"
dslv:drag_enabled="true"
dslv:drag_handle_id="@id/drag_handle"
dslv:drag_scroll_start="0.33"
dslv:float_alpha="0.6"
dslv:max_drag_scroll_speed="0.5"

View File

@ -236,8 +236,7 @@ public class DragSortController extends SimpleFloatViewManager implements View.O
@Override
public boolean onTouch(View v, MotionEvent ev) {
if (!(mDslv.isDragEnabled() || mRemoveEnabled)
|| mDslv.listViewIntercepted()) {
if (!mDslv.isDragEnabled() || mDslv.listViewIntercepted()) {
return false;
}