com.github.droidfu.adapters
Class ListAdapterWithProgress<T>
java.lang.Object
android.widget.BaseAdapter
com.github.droidfu.adapters.ListAdapterWithProgress<T>
- All Implemented Interfaces:
- android.widget.Adapter, android.widget.ListAdapter, android.widget.SpinnerAdapter
public abstract class ListAdapterWithProgress<T>
- extends android.widget.BaseAdapter
Fields inherited from interface android.widget.Adapter |
IGNORE_ITEM_VIEW_TYPE, NO_SELECTION |
Methods inherited from class android.widget.BaseAdapter |
getDropDownView, hasStableIds, notifyDataSetChanged, notifyDataSetInvalidated, registerDataSetObserver, unregisterDataSetObserver |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ListAdapterWithProgress
public ListAdapterWithProgress(android.app.ListActivity activity,
int progressDrawableResourceId)
ListAdapterWithProgress
public ListAdapterWithProgress(android.app.ExpandableListActivity activity,
int progressDrawableResourceId)
ListAdapterWithProgress
public ListAdapterWithProgress(android.app.Activity activity,
android.widget.AbsListView listView,
int progressDrawableResourceId)
getListView
public android.widget.AbsListView getListView()
getProgressView
public android.view.View getProgressView()
getCount
public int getCount()
-
Don't use this to check for the presence of actual data items; use
hasItems()
instead.
isEmpty
public boolean isEmpty()
-
Don't use this to check for the presence of actual data items; use
hasItems()
instead.
- Specified by:
isEmpty
in interface android.widget.Adapter
- Overrides:
isEmpty
in class android.widget.BaseAdapter
getItemCount
public int getItemCount()
- Returns:
- the actual number of data items in this adapter, ignoring the
progress item.
hasItems
public boolean hasItems()
- Returns:
- true if there are actual data items, ignoring the progress item.
getItem
public T getItem(int position)
getItemId
public long getItemId(int position)
isEnabled
public boolean isEnabled(int position)
- Specified by:
isEnabled
in interface android.widget.ListAdapter
- Overrides:
isEnabled
in class android.widget.BaseAdapter
areAllItemsEnabled
public boolean areAllItemsEnabled()
- Specified by:
areAllItemsEnabled
in interface android.widget.ListAdapter
- Overrides:
areAllItemsEnabled
in class android.widget.BaseAdapter
setIsLoadingData
public void setIsLoadingData(boolean isLoadingData)
setIsLoadingData
public void setIsLoadingData(boolean isLoadingData,
boolean redrawList)
isLoadingData
public boolean isLoadingData()
getView
public final android.view.View getView(int position,
android.view.View convertView,
android.view.ViewGroup parent)
doGetView
protected abstract android.view.View doGetView(int position,
android.view.View convertView,
android.view.ViewGroup parent)
getItemViewType
public int getItemViewType(int position)
- Specified by:
getItemViewType
in interface android.widget.Adapter
- Overrides:
getItemViewType
in class android.widget.BaseAdapter
getViewTypeCount
public int getViewTypeCount()
- Specified by:
getViewTypeCount
in interface android.widget.Adapter
- Overrides:
getViewTypeCount
in class android.widget.BaseAdapter
getData
public ArrayList<T> getData()
addAll
public void addAll(List<T> items)
addAll
public void addAll(List<T> items,
boolean redrawList)
clear
public void clear()
remove
public void remove(int position)
Copyright © 2011. All Rights Reserved.