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.ui_components.explore.ExploreAdapter |
Nested Classes | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
class | ExploreAdapter.BuildingInfoData | ||||||||||
class | ExploreAdapter.ChildViewHolder | ||||||||||
class | ExploreAdapter.EmptyGroupViewHolder | ||||||||||
class | ExploreAdapter.ExpandableGroupData | ||||||||||
interface | ExploreAdapter.ExploreAdapterListener | ||||||||||
class | ExploreAdapter.GroupWithChildrenViewHolder |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
ExploreAdapter(List<ExploreAdapter.ExpandableGroupData> dataItems) |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
static List<ExploreAdapter.ExpandableGroupData> | createDataItems(List<? extends ISearchable> exploreList, CoreApi coreApi) | ||||||||||
int |
getChildViewType(int position, ExpandableGroup group, int childIndex)
Used to allow subclasses to have multiple view types for children
| ||||||||||
int |
getGroupViewType(int position, ExpandableGroup group)
Used to allow subclasses to have multiple view types for groups
| ||||||||||
void | hideNearestButton() | ||||||||||
boolean | isChild(int viewType) | ||||||||||
boolean | isGroup(int viewType) | ||||||||||
void |
onBindChildViewHolder(ExploreAdapter.ChildViewHolder 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. | ||||||||||
ExploreAdapter.ChildViewHolder |
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(ExploreAdapter.ExploreAdapterListener listener) |
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() | |||||||||||
![]() | |||||||||||
![]() | |||||||||||
![]() | |||||||||||
![]() |
Used to allow subclasses to have multiple view types for children
position | the flat position in the list |
---|---|
group | the group that this child belongs to |
childIndex | the index of the child within the group |
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 child of a ExpandableGroup |
---|
getChildViewType
than the viewType for
the child is defaulted to CHILD
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 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 getItemViewType(int) |
ViewGroup
parent