public class

DuxListActivity

extends Activity
java.lang.Object
   ↳ android.content.Context
     ↳ android.content.ContextWrapper
       ↳ android.view.ContextThemeWrapper
         ↳ android.app.Activity
           ↳ com.droidux.pack.list.widget.DuxListActivity

Class Overview

A replacement of ListActivity when using the DuxListView instead of the ListView as the listview widget.

Summary

[Expand]
Inherited Constants
From class android.app.Activity
From class android.content.Context
From interface android.content.ComponentCallbacks2
[Expand]
Inherited Fields
From class android.app.Activity
Public Constructors
DuxListActivity()
Public Methods
ListAdapter getListAdapter()
Get the ListAdapter associated with this activity's ListView.
DuxListView getListView()
Get the activity's list view widget.
long getSelectedItemId()
Get the cursor row ID of the currently selected list item.
int getSelectedItemPosition()
Get the position of the currently selected list item.
void onContentChanged()
Updates the screen state (current list and other views) when the content changes.
void setListAdapter(ListAdapter adapter)
Provide the cursor for the list view.
void setSelection(int position)
Set the currently selected list item to the specified position with the adapter's data
Protected Methods
void onDestroy()
Perform any final cleanup before an activity is destroyed.
void onListItemClick(DuxListView l, View v, int position, long id)
This method will be called when an item in the list is selected.
void onRestoreInstanceState(Bundle state)
Ensures the list view has been created before Activity restores all of the view states.
[Expand]
Inherited Methods
From class android.app.Activity
From class android.view.ContextThemeWrapper
From class android.content.ContextWrapper
From class android.content.Context
From class java.lang.Object
From interface android.content.ComponentCallbacks
From interface android.content.ComponentCallbacks2
From interface android.view.KeyEvent.Callback
From interface android.view.LayoutInflater.Factory
From interface android.view.LayoutInflater.Factory2
From interface android.view.View.OnCreateContextMenuListener
From interface android.view.Window.Callback

Public Constructors

public DuxListActivity ()

Since: API Level 2.5

Public Methods

public ListAdapter getListAdapter ()

Since: API Level 2.5

Get the ListAdapter associated with this activity's ListView.

public DuxListView getListView ()

Since: API Level 2.5

Get the activity's list view widget.

public long getSelectedItemId ()

Since: API Level 2.5

Get the cursor row ID of the currently selected list item.

public int getSelectedItemPosition ()

Since: API Level 2.5

Get the position of the currently selected list item.

public void onContentChanged ()

Since: API Level

Updates the screen state (current list and other views) when the content changes.

public void setListAdapter (ListAdapter adapter)

Since: API Level 2.5

Provide the cursor for the list view.

public void setSelection (int position)

Since: API Level 2.5

Set the currently selected list item to the specified position with the adapter's data

Protected Methods

protected void onDestroy ()

Since: API Level

Perform any final cleanup before an activity is destroyed. This can happen either because the activity is finishing (someone called finish() on it, or because the system is temporarily destroying this instance of the activity to save space. You can distinguish between these two scenarios with the isFinishing() method.

Note: do not count on this method being called as a place for saving data! For example, if an activity is editing data in a content provider, those edits should be committed in either onPause() or onSaveInstanceState(Bundle), not here. This method is usually implemented to free resources like threads that are associated with an activity, so that a destroyed activity does not leave such things around while the rest of its application is still running. There are situations where the system will simply kill the activity's hosting process without calling this method (or any others) in it, so it should not be used to do things that are intended to remain around after the process goes away.

Derived classes must call through to the super class's implementation of this method. If they do not, an exception will be thrown.

See Also

protected void onListItemClick (DuxListView l, View v, int position, long id)

Since: API Level 2.5

This method will be called when an item in the list is selected. Subclasses should override. Subclasses can call getListView().getItemAtPosition(position) if they need to access the data associated with the selected item.

Parameters
l The DuxListView where the click happened
v The view that was clicked within the DuxListView
position The position of the view in the list
id The row id of the item that was clicked

protected void onRestoreInstanceState (Bundle state)

Since: API Level

Ensures the list view has been created before Activity restores all of the view states.

Parameters
state the data most recently supplied in onSaveInstanceState(Bundle).