java.lang.Object | |||
↳ | android.widget.BaseAdapter | ||
↳ | android.support.v4.widget.CursorAdapter | ||
↳ | com.mobeta.android.dslv.DragSortCursorAdapter |
![]() |
![]() |
A subclass of android.widget.CursorAdapter that provides
reordering of the elements in the Cursor based on completed
drag-sort operations. The reordering is a simple mapping of
list positions into Cursor positions (the Cursor is unchanged).
To persist changes made by drag-sorts, one can retrieve the
mapping with the getCursorPositions()
method, which
returns the reordered list of Cursor positions.
An instance of this class is passed
to setAdapter(ListAdapter)
and, since
this class implements the DragSortListView.DragSortListener
interface, it is automatically set as the DragSortListener for
the DragSortListView instance.
Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
int | REMOVED |
[Expand]
Inherited Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() | |||||||||||
![]() |
[Expand]
Inherited Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Changes Cursor and clears list-Cursor mapping.
| |||||||||||
Does nothing.
| |||||||||||
On drop, this updates the mapping between Cursor positions
and ListView positions.
| |||||||||||
Get the Cursor position mapped to by the provided list position
(given all previously handled drag-sort
operations).
| |||||||||||
Get the current order of Cursor positions presented by the
list.
| |||||||||||
Get the list position mapped to by the provided Cursor position.
| |||||||||||
On remove, this updates the mapping between Cursor positions
and ListView positions.
| |||||||||||
Resets list-cursor mapping.
| |||||||||||
Swaps Cursor and clears list-Cursor mapping.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() | |||||||||||
![]() | |||||||||||
![]() | |||||||||||
![]() | |||||||||||
![]() | |||||||||||
![]() | |||||||||||
![]() | |||||||||||
![]() | |||||||||||
![]() | |||||||||||
![]() |
Does nothing. Just completes DragSortListener interface.
On drop, this updates the mapping between Cursor positions and ListView positions. The Cursor is unchanged. Retrieve the current mapping with getCursorPositions().
Get the Cursor position mapped to by the provided list position (given all previously handled drag-sort operations).
position | List position |
---|
Get the current order of Cursor positions presented by the list.
Get the list position mapped to by the provided Cursor position.
If the provided Cursor position has been removed by a drag-sort,
this returns REMOVED
.
cursorPosition | A Cursor position |
---|
On remove, this updates the mapping between Cursor positions and ListView positions. The Cursor is unchanged. Retrieve the current mapping with getCursorPositions().
Resets list-cursor mapping.
Swaps Cursor and clears list-Cursor mapping.