bauerca / drag-sort-listview

Android ListView with drag and drop reordering.
3.2k stars 1.44k forks source link

FlingNotWorking #119

Open MarioLenci opened 10 years ago

MarioLenci commented 10 years ago

I can't get the fling feature to work.

here is my xml code:

<com.mobeta.android.dslv.DragSortListView
    android:id="@+id/editor_question_list"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:layout_below="@+id/separator"
    android:layout_marginTop="@dimen/small_margin"
    dslv:collapsed_height="2dp"
    dslv:drag_enabled="true"
    dslv:fling_handle_id="@+id/handle"
    dslv:drag_handle_id="@+id/handle"
    dslv:drag_scroll_start="0.33"
    dslv:drag_start_mode="onDown"
    dslv:float_alpha="1"
    dslv:float_background_color="@color/transparent"
    dslv:max_drag_scroll_speed="0.5"
    dslv:remove_enabled="true"
    dslv:remove_mode="flingRemove"
    dslv:slide_shuffle_speed="0.3"
    dslv:sort_enabled="true"
    dslv:track_drag_sort="false"
    dslv:use_default_controller="true" />

in the java code i don't do anything triky, i just have an ArrayAdapter for the dataset.

am i doing something wrong? i can remove items but it's pretty hard cause i have to slide without moving it...

Can someone help me with this?

thanks in advance

villoren commented 10 years ago

Check this file: /library/src/com/mobeta/android/dslv/DragSortController.java Line450:

  if (mRemoveEnabled && mIsRemoving) {

... should be

  if (mRemoveEnabled && !mIsRemoving) {
sylvia43 commented 9 years ago

Can confirm what @villoren said.

asking1233 commented 9 years ago

may the parent of it Intercept the touch event. check it