bauerca / drag-sort-listview

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

Overscroll mode not working #103

Closed YuraAAA closed 11 years ago

YuraAAA commented 11 years ago

Hi. I tried your library, Everything is very fine...amazing! But i don't understand how use overscroll mode?

XML:

 some layouts...
       <com.myp.DragSortListView
        xmlns:android="http://schemas.android.com/apk/res/android"
        xmlns:dslv="http://schemas.android.com/apk/res/com.myp"
        android:id="@android:id/list"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:dividerHeight="0dip"
        android:divider="#000000"
        android:layout_marginLeft="@dimen/home_list_left_right_margin"
        android:layout_marginRight="@dimen/home_list_left_right_margin"

        android:overScrollMode="always"

        dslv:drag_enabled="true"
        dslv:collapsed_height="2dp"
        dslv:drag_scroll_start="0.33"
        dslv:max_drag_scroll_speed="0.5"
        dslv:float_alpha="0.6"
        dslv:slide_shuffle_speed="0.3"
        dslv:track_drag_sort="false"
        dslv:use_default_controller="true"
        dslv:drag_handle_id="@+id/homeLeagueLogo"
        dslv:sort_enabled="true"
        dslv:remove_enabled="false"
        dslv:drag_start_mode="onDown"
        dslv:remove_mode="flingRemove"  />

I tried make it in code:

 dragSortListView.setOverScrollMode(AbsListView.OVER_SCROLL_ALWAYS);

but overscroll not working. What am I doing wrong? Thanks.

bauerca commented 11 years ago

Overscroll will not work while dragging an item. Is this what you mean?

Overscroll during a regular scroll works fine in the demos. (OVER_SCROLL_ALWAYS is the android default).

YuraAAA commented 11 years ago

I mean somethink like this http://www.youtube.com/watch?v=dOyWCDhlxv8 .

YuraAAA commented 11 years ago

Oh, sorry, i understand. We need to override overScrollBy method and change maxOverScrollY variable in super.overScrollBy. Thank you so much.

MrTranduchuy commented 10 years ago

@bauerca : Hello,

"Overscroll will not work while dragging an item. Is this what you mean?"

Is the problem I got. Please tell me how to fix this?

Thanks,

MrTranduchuy commented 10 years ago

Ah okay, can fix now by using " dslv:drag_handle_id="@+id/homeLeagueLogo""