java.lang.Object | ||||
↳ | RecyclerView.Adapter | |||
↳ | com.mapsted.ui.views.widgets.expandablerecyclerview.ExpandableRecyclerViewAdapter<GVH extends com.mapsted.ui.views.widgets.expandablerecyclerview.viewholders.GroupViewHolder, CVH extends com.mapsted.ui.views.widgets.expandablerecyclerview.viewholders.ChildViewHolder> | |||
↳ | com.mapsted.ui.views.widgets.expandablerecyclerview.MultiTypeExpandableRecyclerViewAdapter<GVH extends com.mapsted.ui.views.widgets.expandablerecyclerview.viewholders.GroupViewHolder, CVH extends com.mapsted.ui.views.widgets.expandablerecyclerview.viewholders.ChildViewHolder> | |||
↳ | com.mapsted.template_core.ui.category.adapter.ExpandableCategoryAdapter |
Nested Classes | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
class | ExpandableCategoryAdapter.EmptyChildrenParentCategoryViewHolder | Category view holder for parent categories without children | |||||||||
interface | ExpandableCategoryAdapter.ExpandableCategoryAdapterListener | ||||||||||
class | ExpandableCategoryAdapter.ParentCategoryViewHolder | Category view holder for parent categories with children |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
ExpandableCategoryAdapter(List<ExpandableCategoryGroup> expandableCategoryGroups, Context context, List<Integer> propertyIds, String fallbackIconUrl) |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
int |
getGroupViewType(int position, ExpandableGroup group)
Used to allow subclasses to have multiple view types for groups
| ||||||||||
boolean | isGroup(int viewType) | ||||||||||
void |
onBindChildViewHolder(ExpandableCategoryAdapter.ChildCategoryViewHolder holder, int flatPosition, ExpandableGroup group, int childIndex)
Called from onBindViewHolder(RecyclerView.ViewHolder, int) when the list item
bound to is a child.
| ||||||||||
void |
onBindGroupViewHolder(GroupViewHolder holder, int flatPosition, ExpandableGroup group)
Called from onBindViewHolder(RecyclerView.ViewHolder, int) when the list item bound to is a
group
Bind data to the GVH here. | ||||||||||
ExpandableCategoryAdapter.ChildCategoryViewHolder |
onCreateChildViewHolder(ViewGroup parent, int viewType)
Called from
onCreateViewHolder(ViewGroup, int) when the list item created is a child | ||||||||||
GroupViewHolder |
onCreateGroupViewHolder(ViewGroup parent, int viewType)
Called from
onCreateViewHolder(ViewGroup, int) when the list item created is a group | ||||||||||
void | setListener(ExpandableCategoryAdapter.ExpandableCategoryAdapterListener listener) |
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() | |||||||||||
![]() | |||||||||||
![]() | |||||||||||
![]() | |||||||||||
![]() |
Used to allow subclasses to have multiple view types for groups
position | the flat position in the list |
---|---|
group | the group at this position |
viewType | the int corresponding to the viewType of a ExpandableGroup |
---|
getGroupViewType
than the viewType for
the group is defaulted to GROUP
Called from onBindViewHolder(RecyclerView.ViewHolder, int) when the list item bound to is a child.
Bind data to the CVH here.
holder | The CVH to bind data to |
---|---|
flatPosition | the flat position (raw index) in the list at which to bind the child |
group | The ExpandableGroup that the the child list item belongs to |
childIndex | the index of this child within it's ExpandableGroup |
Called from onBindViewHolder(RecyclerView.ViewHolder, int) when the list item bound to is a group
Bind data to the GVH here.
holder | The GVH to bind data to |
---|---|
flatPosition | the flat position (raw index) in the list at which to bind the group |
group | The ExpandableGroup to be used to bind data to this GVH |
Called from onCreateViewHolder(ViewGroup, int)
when the list item created is a child
parent | the ViewGroup in the list for which a CVH is being created |
---|---|
viewType | an int returned by ExpandableRecyclerViewAdapter#getItemViewType(int) |
ViewGroup
parent
Called from onCreateViewHolder(ViewGroup, int)
when the list item created is a group
parent | the ViewGroup in the list for which a GVH is being created |
---|---|
viewType | an int returned by ExpandableRecyclerViewAdapter#getItemViewType(int) |
ViewGroup
parent