public class SectionListAdapter
extends android.widget.BaseAdapter
implements android.widget.ListAdapter, android.widget.AdapterView.OnItemClickListener
| Modifier and Type | Field and Description |
|---|---|
protected android.view.LayoutInflater |
inflater |
| Constructor and Description |
|---|
SectionListAdapter(android.content.Context context,
android.view.LayoutInflater inflater,
android.widget.ListAdapter linkedAdapter) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
areAllItemsEnabled() |
protected android.view.View |
createNewSectionView() |
int |
getCount() |
Object |
getItem(int position) |
long |
getItemId(int position) |
int |
getItemViewType(int position) |
protected Integer |
getLinkedPosition(int position) |
String |
getSectionName(int position) |
int |
getSectionPosition(String sectionName) |
android.view.View |
getTransparentSectionView() |
android.view.View |
getView(int position,
android.view.View convertView,
android.view.ViewGroup parent) |
int |
getViewTypeCount() |
boolean |
hasStableIds() |
boolean |
isEmpty() |
boolean |
isEnabled(int position) |
boolean |
isSection(int position) |
void |
makeSectionInvisibleIfFirstInList(int firstVisibleItem)
Hide the section header when it reaches the top of the list.
|
void |
onItemClick(android.widget.AdapterView<?> parent,
android.view.View view,
int position,
long id) |
void |
registerDataSetObserver(android.database.DataSetObserver observer) |
protected void |
replaceSectionViewsInMaps(String section,
android.view.View theView) |
protected void |
sectionClicked(String section) |
void |
setOnItemClickListener(android.widget.AdapterView.OnItemClickListener linkedListener) |
protected void |
setSectionText(String section,
android.view.View sectionView)
Writes
section on the view sectionView. |
void |
unregisterDataSetObserver(android.database.DataSetObserver observer) |
public SectionListAdapter(android.content.Context context,
android.view.LayoutInflater inflater,
android.widget.ListAdapter linkedAdapter)
public int getCount()
getCount in interface android.widget.Adapterpublic Object getItem(int position)
getItem in interface android.widget.Adapterpublic boolean isSection(int position)
public String getSectionName(int position)
public int getSectionPosition(String sectionName)
public long getItemId(int position)
getItemId in interface android.widget.Adapterprotected Integer getLinkedPosition(int position)
public int getItemViewType(int position)
getItemViewType in interface android.widget.AdaptergetItemViewType in class android.widget.BaseAdapterprotected void setSectionText(String section, android.view.View sectionView)
section on the view sectionView.section - The label to write for this section.sectionView - The view on which the label is set.protected void replaceSectionViewsInMaps(String section, android.view.View theView)
protected android.view.View createNewSectionView()
public android.view.View getView(int position,
android.view.View convertView,
android.view.ViewGroup parent)
getView in interface android.widget.Adapterpublic int getViewTypeCount()
getViewTypeCount in interface android.widget.AdaptergetViewTypeCount in class android.widget.BaseAdapterpublic boolean hasStableIds()
hasStableIds in interface android.widget.AdapterhasStableIds in class android.widget.BaseAdapterpublic boolean isEmpty()
isEmpty in interface android.widget.AdapterisEmpty in class android.widget.BaseAdapterpublic void registerDataSetObserver(android.database.DataSetObserver observer)
registerDataSetObserver in interface android.widget.AdapterregisterDataSetObserver in class android.widget.BaseAdapterpublic void unregisterDataSetObserver(android.database.DataSetObserver observer)
unregisterDataSetObserver in interface android.widget.AdapterunregisterDataSetObserver in class android.widget.BaseAdapterpublic boolean areAllItemsEnabled()
areAllItemsEnabled in interface android.widget.ListAdapterareAllItemsEnabled in class android.widget.BaseAdapterpublic boolean isEnabled(int position)
isEnabled in interface android.widget.ListAdapterisEnabled in class android.widget.BaseAdapterpublic void makeSectionInvisibleIfFirstInList(int firstVisibleItem)
firstVisibleItem - The position of the item currently at the top of the list.public android.view.View getTransparentSectionView()
protected void sectionClicked(String section)
public void onItemClick(android.widget.AdapterView<?> parent,
android.view.View view,
int position,
long id)
onItemClick in interface android.widget.AdapterView.OnItemClickListenerpublic void setOnItemClickListener(android.widget.AdapterView.OnItemClickListener linkedListener)
Copyright © 2003–2016 eXo Platform SAS. All rights reserved.