public class

SimpleFloatViewManager

extends Object
implements DragSortListView.FloatViewManager
java.lang.Object
   ↳ com.mobeta.android.dslv.SimpleFloatViewManager
Known Direct Subclasses

Class Overview

Simple implementation of the FloatViewManager class. Uses list items as they appear in the ListView to create the floating View.

Summary

Public Constructors
SimpleFloatViewManager(ListView lv)
Public Methods
View onCreateFloatView(int position)
This simple implementation creates a Bitmap copy of the list item currently shown at ListView position.
void onDestroyFloatView(View floatView)
Removes the Bitmap from the ImageView created in onCreateFloatView() and tells the system to recycle it.
void onDragFloatView(View floatView, Point position, Point touch)
This does nothing
void setBackgroundColor(int color)
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.mobeta.android.dslv.DragSortListView.FloatViewManager

Public Constructors

public SimpleFloatViewManager (ListView lv)

Public Methods

public View onCreateFloatView (int position)

This simple implementation creates a Bitmap copy of the list item currently shown at ListView position.

Parameters
position Position of item to drag (NOTE: position excludes header Views; thus, if you want to call getChildAt(int), you will need to add getHeaderViewsCount() to the index).
Returns
  • The View you wish to display as the floating View.

public void onDestroyFloatView (View floatView)

Removes the Bitmap from the ImageView created in onCreateFloatView() and tells the system to recycle it.

Parameters
floatView The floating View passed to onCreateFloatView(int).

public void onDragFloatView (View floatView, Point position, Point touch)

This does nothing

Parameters
floatView The floating View.
position The location (top-left; relative to DSLV top-left) at which the float View would like to appear, given the current touch location and the offset provided in startDrag(int, View, int, int, int).
touch The current touch location (relative to DSLV top-left).

public void setBackgroundColor (int color)