public abstract class ExpandableAdapter<T,V>
extends android.widget.BaseExpandableListAdapter
| 限定符和类型 | 字段和说明 |
|---|---|
protected int |
childLayoutResId |
protected android.content.Context |
context |
protected java.util.ArrayList<T> |
data |
protected int |
groupLayoutResId |
| 构造器和说明 |
|---|
ExpandableAdapter(android.content.Context context,
int groupLayoutResId,
int childLayoutResId) |
ExpandableAdapter(android.content.Context context,
int groupLayoutResId,
int childLayoutResId,
java.util.List<T> data) |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
add(T elem) |
void |
addAll(java.util.List<T> elem) |
void |
addAllAt(int location,
java.util.List<T> elements) |
void |
addAt(int location,
T elem) |
void |
clear() |
boolean |
contains(T elem) |
protected abstract void |
convertChildView(boolean isLastChild,
H helper,
V item) |
protected abstract void |
convertGroupView(boolean isExpanded,
H helper,
T item) |
T |
get(int position) |
protected ExpandableAdapterHelper |
getAdapterHelper(int groupPosition,
int childPosition,
android.view.View convertView,
android.view.ViewGroup parent) |
java.util.ArrayList<T> |
getAll() |
V |
getChild(int groupPosition,
int childPosition) |
long |
getChildId(int groupPosition,
int childPosition) |
protected abstract java.util.List<V> |
getChildren(int groupPosition) |
int |
getChildrenCount(int groupPosition) |
android.view.View |
getChildView(int groupPosition,
int childPosition,
boolean isLastChild,
android.view.View convertView,
android.view.ViewGroup parent) |
T |
getGroup(int groupPosition) |
int |
getGroupCount() |
long |
getGroupId(int groupPosition) |
android.view.View |
getGroupView(int groupPosition,
boolean isExpanded,
android.view.View convertView,
android.view.ViewGroup parent) |
int |
getSize() |
boolean |
hasStableIds() |
boolean |
isChildSelectable(int groupPosition,
int childPosition) |
void |
remove(java.util.List<T> list) |
void |
remove(T elem) |
void |
removeAt(int index) |
void |
replace(T oldElem,
T newElem) |
void |
replaceAll(java.util.List<T> elem) |
void |
replaceAt(int index,
T elem) |
areAllItemsEnabled, getChildType, getChildTypeCount, getCombinedChildId, getCombinedGroupId, getGroupType, getGroupTypeCount, isEmpty, notifyDataSetChanged, notifyDataSetInvalidated, onGroupCollapsed, onGroupExpanded, registerDataSetObserver, unregisterDataSetObserverprotected java.util.ArrayList<T> data
protected android.content.Context context
protected final int groupLayoutResId
protected final int childLayoutResId
public ExpandableAdapter(android.content.Context context,
int groupLayoutResId,
int childLayoutResId)
public ExpandableAdapter(android.content.Context context,
int groupLayoutResId,
int childLayoutResId,
java.util.List<T> data)
protected ExpandableAdapterHelper getAdapterHelper(int groupPosition, int childPosition, android.view.View convertView, android.view.ViewGroup parent)
public void add(T elem)
public void addAt(int location,
T elem)
public void addAll(java.util.List<T> elem)
public void addAllAt(int location,
java.util.List<T> elements)
public void remove(T elem)
public void removeAt(int index)
public void remove(java.util.List<T> list)
public void clear()
public void replace(T oldElem,
T newElem)
public void replaceAt(int index,
T elem)
public void replaceAll(java.util.List<T> elem)
public T get(int position)
public java.util.ArrayList<T> getAll()
public int getSize()
public boolean contains(T elem)
public int getGroupCount()
getGroupCount 在接口中 android.widget.ExpandableListAdapterpublic int getChildrenCount(int groupPosition)
getChildrenCount 在接口中 android.widget.ExpandableListAdapterpublic T getGroup(int groupPosition)
getGroup 在接口中 android.widget.ExpandableListAdapterpublic V getChild(int groupPosition,
int childPosition)
getChild 在接口中 android.widget.ExpandableListAdapterpublic long getGroupId(int groupPosition)
getGroupId 在接口中 android.widget.ExpandableListAdapterpublic long getChildId(int groupPosition,
int childPosition)
getChildId 在接口中 android.widget.ExpandableListAdapterpublic boolean hasStableIds()
hasStableIds 在接口中 android.widget.ExpandableListAdapterpublic boolean isChildSelectable(int groupPosition,
int childPosition)
isChildSelectable 在接口中 android.widget.ExpandableListAdapterpublic android.view.View getGroupView(int groupPosition,
boolean isExpanded,
android.view.View convertView,
android.view.ViewGroup parent)
getGroupView 在接口中 android.widget.ExpandableListAdapterpublic android.view.View getChildView(int groupPosition,
int childPosition,
boolean isLastChild,
android.view.View convertView,
android.view.ViewGroup parent)
getChildView 在接口中 android.widget.ExpandableListAdapterprotected abstract java.util.List<V> getChildren(int groupPosition)
protected abstract void convertGroupView(boolean isExpanded,
H helper,
T item)
protected abstract void convertChildView(boolean isLastChild,
H helper,
V item)