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.Adapter
public Object getItem(int position)
getItem
in interface android.widget.Adapter
public boolean isSection(int position)
public String getSectionName(int position)
public int getSectionPosition(String sectionName)
public long getItemId(int position)
getItemId
in interface android.widget.Adapter
protected Integer getLinkedPosition(int position)
public int getItemViewType(int position)
getItemViewType
in interface android.widget.Adapter
getItemViewType
in class android.widget.BaseAdapter
protected 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.Adapter
public int getViewTypeCount()
getViewTypeCount
in interface android.widget.Adapter
getViewTypeCount
in class android.widget.BaseAdapter
public boolean hasStableIds()
hasStableIds
in interface android.widget.Adapter
hasStableIds
in class android.widget.BaseAdapter
public boolean isEmpty()
isEmpty
in interface android.widget.Adapter
isEmpty
in class android.widget.BaseAdapter
public void registerDataSetObserver(android.database.DataSetObserver observer)
registerDataSetObserver
in interface android.widget.Adapter
registerDataSetObserver
in class android.widget.BaseAdapter
public void unregisterDataSetObserver(android.database.DataSetObserver observer)
unregisterDataSetObserver
in interface android.widget.Adapter
unregisterDataSetObserver
in class android.widget.BaseAdapter
public boolean areAllItemsEnabled()
areAllItemsEnabled
in interface android.widget.ListAdapter
areAllItemsEnabled
in class android.widget.BaseAdapter
public boolean isEnabled(int position)
isEnabled
in interface android.widget.ListAdapter
isEnabled
in class android.widget.BaseAdapter
public 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.OnItemClickListener
public void setOnItemClickListener(android.widget.AdapterView.OnItemClickListener linkedListener)
Copyright © 2003–2016 eXo Platform SAS. All rights reserved.