forked from bauerca/drag-sort-listview
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Major update: allow DSLV customization
Customization is the theme of this commit. Previously, DSLV forced many design decisions on the developer (e.g. how a drag starts/stops, how you remove an item while dragging it, how the floating View appears). This commit removes those restrictions by beefing up the DSLV API. However, the conveniences of DSLV have not gone away. Two new classes implement common design requests (long-press to drag item, fling to remove, etc.): DragSortController and SimpleFloatViewManager. New public API goodies are few, but relinquish loads of design control. They include: 1. startDrag() and stopDrag() methods on DSLV 2. FloatViewManager interface for customization of floating View. Examples and README have been extensively updated to explain and showcase the new features.
- Loading branch information
Showing
49 changed files
with
2,239 additions
and
1,036 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<clip | ||
xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:drawable="@color/blue" | ||
android:clipOrientation="horizontal" | ||
android:gravity="left|fill_vertical" /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<fragment | ||
xmlns:android="http://schemas.android.com/apk/res/android" | ||
class="com.mobeta.android.demodslv.DSLVFragmentBGHandle" | ||
android:id="@+id/bg_handle" | ||
android:layout_width="fill_parent" | ||
android:layout_height="fill_parent" /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<com.mobeta.android.dslv.DragSortListView | ||
xmlns:android="http://schemas.android.com/apk/res/android" | ||
xmlns:dslv="http://schemas.android.com/apk/res/com.mobeta.android.demodslv" | ||
android:id="@android:id/list" | ||
android:layout_width="fill_parent" | ||
android:layout_height="fill_parent" | ||
android:paddingTop="0dp" | ||
android:paddingBottom="0dp" | ||
android:paddingLeft="10dp" | ||
android:layout_margin="10dp" | ||
android:dividerHeight="5dp" | ||
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" /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,21 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<RelativeLayout | ||
xmlns:android="http://schemas.android.com/apk/res/android" | ||
xmlns:dslv="http://schemas.android.com/apk/res/com.mobeta.android.demodslv" | ||
android:layout_width="fill_parent" | ||
android:layout_height="fill_parent"> | ||
<com.mobeta.android.dslv.DragSortListView | ||
android:id="@android:id/list" | ||
android:layout_width="fill_parent" | ||
android:layout_height="fill_parent" | ||
android:paddingTop="0dp" | ||
android:paddingBottom="0dp" | ||
android:paddingLeft="10dp" | ||
android:layout_margin="10dp" | ||
<com.mobeta.android.dslv.DragSortListView | ||
xmlns:android="http://schemas.android.com/apk/res/android" | ||
xmlns:dslv="http://schemas.android.com/apk/res/com.mobeta.android.demodslv" | ||
android:id="@android:id/list" | ||
android:layout_width="fill_parent" | ||
android:layout_height="fill_parent" | ||
android:paddingTop="0dp" | ||
android:paddingBottom="0dp" | ||
android:paddingLeft="10dp" | ||
android:layout_margin="10dp" | ||
android:dividerHeight="5dp" | ||
dslv:collapsed_height="2dp" | ||
dslv:drag_scroll_start="0.33" | ||
dslv:max_drag_scroll_speed="0.5" | ||
dslv:float_background_color="#000000" | ||
dslv:remove_mode="slideLeft" | ||
dslv:drag_enabled="true" | ||
dslv:collapsed_height="2dp" | ||
dslv:drag_scroll_start="0.33" | ||
dslv:max_drag_scroll_speed="0.5" | ||
dslv:float_background_color="#000000" | ||
dslv:remove_mode="slideLeft" | ||
dslv:float_alpha="0.6" | ||
dslv:slide_shuffle_speed="0.3" | ||
dslv:track_drag_sort="false" /> | ||
</RelativeLayout> | ||
dslv:track_drag_sort="false" /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<TextView | ||
xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:id="@+id/text" | ||
android:layout_width="fill_parent" | ||
android:layout_height="@dimen/item_height" | ||
android:textAppearance="?android:attr/textAppearanceMedium" | ||
android:gravity="center_vertical|center_horizontal" /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<com.mobeta.android.dslv.DragSortListView | ||
xmlns:android="http://schemas.android.com/apk/res/android" | ||
xmlns:dslv="http://schemas.android.com/apk/res/com.mobeta.android.demodslv" | ||
android:id="@android:id/list" | ||
android:layout_width="fill_parent" | ||
android:layout_height="fill_parent" | ||
android:paddingTop="0dp" | ||
android:paddingBottom="0dp" | ||
android:paddingLeft="10dp" | ||
android:layout_margin="10dp" | ||
android:dividerHeight="5dp" | ||
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/drag_handle" | ||
dslv:sort_enabled="true" | ||
dslv:remove_enabled="true" | ||
dslv:drag_start_mode="onDown" | ||
dslv:remove_mode="flingLeft" /> |
Oops, something went wrong.