English | Site Directory

Android - An Open Handset Alliance Project

android.widget
public abstract class

android.widget.BaseAdapter

java.lang.Object
android.widget.BaseAdapter Adapter GalleryAdapter ListAdapter
Known Direct Subclasses
Known Indirect Subclasses

Summary

Constants inherited from interface android.widget.Adapter

Public Constructors

          BaseAdapter()

Public Methods

        boolean  areAllItemsSelectable()
Are all items in this ListAdapter selectable?
        float  getAlpha(boolean focused, int offset)

Return the translucency of the specified item in the gallery.

        View  getDropDownView(int position, View convertView, ViewGroup parent)

Get a View that displays in the drop down popup the data at the specified position in the data set.

        View  getMeasurementView(ViewGroup parent)

Return a View to be used by a Spinner to measure its width and height with the UNSPECIFIED or AT_MOST measure specification.

        int  getNewSelectionForKey(int currentSelection, int keyCode, KeyEvent event)
Given a keyboard key, let the adapter suggest the position in the data set to be made the new selected item.
        float  getScale(boolean focused, int offset)

Return the scale factor of the specified item in the gallery.

        boolean  isSelectable(int position)
Returns true if the specified position is a separator (a non-selectable item).
        void  notifyDataSetChanged()
        void  notifyDataSetInvalidated()
        void  registerDataSetObserver(DataSetObserver observer)
Register an observer that is called when changes happen to the data used by this adapter.
        boolean  stableIds()
Indicated whether the item ids are stable across changes to the underlying data.
        void  unregisterDataSetObserver(DataSetObserver observer)
Unregister an observer that has previously been registered with this adapter via registerDataSetObserver(DataSetObserver).
Methods inherited from class java.lang.Object
Methods inherited from interface android.widget.GalleryAdapter
Methods inherited from interface android.widget.ListAdapter
Methods inherited from interface android.widget.SpinnerAdapter
Methods inherited from interface android.widget.Adapter

Details

Public Constructors

public BaseAdapter()

Public Methods

public boolean areAllItemsSelectable()

Are all items in this ListAdapter selectable?

public float getAlpha(boolean focused, int offset)

Return the translucency of the specified item in the gallery.

public View getDropDownView(int position, View convertView, ViewGroup parent)

Get a View that displays in the drop down popup the data at the specified position in the data set.

public View getMeasurementView(ViewGroup parent)

Return a View to be used by a Spinner to measure its width and height with the UNSPECIFIED or AT_MOST measure specification. This method can be overriden to change the default width and height of the spinner.

public int getNewSelectionForKey(int currentSelection, int keyCode, KeyEvent event)

Given a keyboard key, let the adapter suggest the position in the data set to be made the new selected item. Return NO_SELECTION to indicate no appropriate key (for example, the user pressed the back button, or a subclass does not support this feature).

public float getScale(boolean focused, int offset)

Return the scale factor of the specified item in the gallery.

public boolean isSelectable(int position)

Returns true if the specified position is a separator (a non-selectable item).

public void notifyDataSetChanged()

public void notifyDataSetInvalidated()

public void registerDataSetObserver(DataSetObserver observer)

Register an observer that is called when changes happen to the data used by this adapter.

public boolean stableIds()

Indicated whether the item ids are stable across changes to the underlying data.

public void unregisterDataSetObserver(DataSetObserver observer)

Unregister an observer that has previously been registered with this adapter via registerDataSetObserver(DataSetObserver).
Build m5-rc15i - 10 Jun 2008 13:54