FileDocCategorySizeDatePackage
BaseAdapter.javaAPI DocAndroid 1.5 API2384Wed May 06 22:41:56 BST 2009android.widget

BaseAdapter

public abstract class BaseAdapter extends Object implements SpinnerAdapter, ListAdapter
Common base class of common implementation for an {@link Adapter} that can be used in both {@link ListView} (by implementing the specialized {@link ListAdapter} interface} and {@link Spinner} (by implementing the specialized {@link SpinnerAdapter} interface.

Fields Summary
private final android.database.DataSetObservable
mDataSetObservable
Constructors Summary
Methods Summary
public booleanareAllItemsEnabled()

        return true;
    
public android.view.ViewgetDropDownView(int position, android.view.View convertView, android.view.ViewGroup parent)

        return getView(position, convertView, parent);
    
public intgetItemViewType(int position)

        return 0;
    
public intgetViewTypeCount()

        return 1;
    
public booleanhasStableIds()


       
        return false;
    
public booleanisEmpty()

        return getCount() == 0;
    
public booleanisEnabled(int position)

        return true;
    
public voidnotifyDataSetChanged()
Notifies the attached View that the underlying data has been changed and it should refresh itself.

        mDataSetObservable.notifyChanged();
    
public voidnotifyDataSetInvalidated()

        mDataSetObservable.notifyInvalidated();
    
public voidregisterDataSetObserver(android.database.DataSetObserver observer)

        mDataSetObservable.registerObserver(observer);
    
public voidunregisterDataSetObserver(android.database.DataSetObserver observer)

        mDataSetObservable.unregisterObserver(observer);