FileDocCategorySizeDatePackage
BaseAdapter.javaAPI DocAndroid 5.1 API2636Thu Mar 12 22:22:10 GMT 2015android.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 observers that the underlying data has been changed and any View reflecting the data set should refresh itself.

        mDataSetObservable.notifyChanged();
    
public voidnotifyDataSetInvalidated()
Notifies the attached observers that the underlying data is no longer valid or available. Once invoked this adapter is no longer valid and should not report further data set changes.

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

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

        mDataSetObservable.unregisterObserver(observer);