public abstract class BGAAdapterViewAdapter<M>
extends android.widget.BaseAdapter
| 限定符和类型 | 字段和说明 |
|---|---|
protected android.content.Context |
mContext |
protected java.util.List<M> |
mDatas |
protected int |
mItemLayoutId |
protected BGAOnItemChildClickListener |
mOnItemChildClickListener |
protected BGAOnItemChildLongClickListener |
mOnItemChildLongClickListener |
| 构造器和说明 |
|---|
BGAAdapterViewAdapter(android.content.Context context,
int itemLayoutId) |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
addDatas(java.util.List<M> datas) |
void |
addItem(int position,
M model) |
protected abstract void |
fillData(BGAViewHolderHelper viewHolderHelper,
M model,
int position) |
int |
getCount() |
M |
getItem(int position) |
long |
getItemId(int position) |
android.view.View |
getView(int position,
android.view.View convertView,
android.view.ViewGroup parent) |
void |
removeItem(int position) |
void |
removeItem(M model) |
void |
setDatas(java.util.List<M> datas) |
void |
setItem(int location,
M newModel) |
void |
setItem(M oldModel,
M newModel) |
protected abstract void |
setItemChildListener(BGAViewHolderHelper viewHolderHelper)
为item的孩子节点设置监听器
|
void |
setOnItemChildClickListener(BGAOnItemChildClickListener onItemChildClickListener) |
void |
setOnItemChildLongClickListener(BGAOnItemChildLongClickListener onItemChildLongClickListener) |
protected final int mItemLayoutId
protected android.content.Context mContext
protected java.util.List<M> mDatas
protected BGAOnItemChildClickListener mOnItemChildClickListener
protected BGAOnItemChildLongClickListener mOnItemChildLongClickListener
public BGAAdapterViewAdapter(android.content.Context context,
int itemLayoutId)
public int getCount()
public M getItem(int position)
public long getItemId(int position)
public android.view.View getView(int position,
android.view.View convertView,
android.view.ViewGroup parent)
protected abstract void setItemChildListener(BGAViewHolderHelper viewHolderHelper)
viewHolderHelper - protected abstract void fillData(BGAViewHolderHelper viewHolderHelper, M model, int position)
viewHolderHelper - model - position - public void setOnItemChildClickListener(BGAOnItemChildClickListener onItemChildClickListener)
public void setOnItemChildLongClickListener(BGAOnItemChildLongClickListener onItemChildLongClickListener)
public void setDatas(java.util.List<M> datas)
public void addDatas(java.util.List<M> datas)
public void removeItem(int position)
public void removeItem(M model)
public void addItem(int position,
M model)
public void setItem(int location,
M newModel)