public abstract class BaseViewPagerAdapter<T,H extends PagerAdapterHelper>
extends android.support.v4.view.PagerAdapter
| 限定符和类型 | 字段和说明 |
|---|---|
protected java.util.Queue<android.view.View> |
cacheViews |
protected android.content.Context |
context |
protected int |
currentPosition |
protected android.view.View |
currentTarget |
protected java.util.ArrayList<T> |
data |
protected int |
layoutResId |
| 构造器和说明 |
|---|
BaseViewPagerAdapter(android.content.Context context,
int layoutResId) |
BaseViewPagerAdapter(android.content.Context context,
int layoutResId,
java.util.List<T> data) |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
add(T elem) |
void |
addAll(java.util.List<T> elements) |
void |
addAllAt(int location,
java.util.List<T> elements) |
void |
addAt(int location,
T elem) |
void |
clear() |
boolean |
contains(T elem) |
protected abstract void |
convert(H helper,
T item) |
void |
destroyItem(android.view.ViewGroup container,
int position,
java.lang.Object object) |
T |
get(int position) |
protected abstract H |
getAdapterHelper(int position,
android.view.View convertView,
android.view.ViewGroup parent) |
java.util.ArrayList<T> |
getAll() |
int |
getCount() |
int |
getSize() |
java.lang.Object |
instantiateItem(android.view.ViewGroup container,
int position) |
boolean |
isViewFromObject(android.view.View view,
java.lang.Object object) |
void |
notifyDataSetChanged() |
void |
onEmpty() |
void |
remove(T elem) |
void |
removeAll(java.util.List<T> elements) |
void |
removeAt(int index) |
void |
replace(T oldElem,
T newElem) |
void |
replaceAll(java.util.List<T> elements) |
void |
replaceAt(int index,
T elem) |
void |
setPrimaryItem(android.view.ViewGroup container,
int position,
java.lang.Object object) |
protected final android.content.Context context
protected final int layoutResId
protected final java.util.ArrayList<T> data
protected java.util.Queue<android.view.View> cacheViews
protected int currentPosition
protected android.view.View currentTarget
public BaseViewPagerAdapter(android.content.Context context,
int layoutResId)
public BaseViewPagerAdapter(android.content.Context context,
int layoutResId,
java.util.List<T> data)
public void add(T elem)
public void addAt(int location,
T elem)
public void addAll(java.util.List<T> elements)
public void addAllAt(int location,
java.util.List<T> elements)
public void remove(T elem)
public void removeAt(int index)
public void removeAll(java.util.List<T> elements)
public void clear()
public void replaceAt(int index,
T elem)
public void replaceAll(java.util.List<T> elements)
public T get(int position)
public java.util.ArrayList<T> getAll()
public int getSize()
public boolean contains(T elem)
public void onEmpty()
public void notifyDataSetChanged()
notifyDataSetChanged 在类中 android.support.v4.view.PagerAdapterpublic int getCount()
getCount 在类中 android.support.v4.view.PagerAdapterpublic boolean isViewFromObject(android.view.View view,
java.lang.Object object)
isViewFromObject 在类中 android.support.v4.view.PagerAdapterpublic java.lang.Object instantiateItem(android.view.ViewGroup container,
int position)
instantiateItem 在类中 android.support.v4.view.PagerAdapterpublic void destroyItem(android.view.ViewGroup container,
int position,
java.lang.Object object)
destroyItem 在类中 android.support.v4.view.PagerAdapterpublic void setPrimaryItem(android.view.ViewGroup container,
int position,
java.lang.Object object)
setPrimaryItem 在类中 android.support.v4.view.PagerAdapterprotected abstract H getAdapterHelper(int position, android.view.View convertView, android.view.ViewGroup parent)