public class ManeuverListAdapter extends androidx.recyclerview.widget.RecyclerView.Adapter<ManeuverListAdapter.ViewHolder>
RecyclerView.Adapter
to bind a view item of the list to a
ManeuverItemView
.Modifier and Type | Class and Description |
---|---|
class |
ManeuverListAdapter.ViewHolder
A view holder.
|
Constructor and Description |
---|
ManeuverListAdapter(java.util.List<com.here.android.mpa.routing.Maneuver> maneuverList)
Constructs a new instance using a list of maneuvers.
|
Modifier and Type | Method and Description |
---|---|
int |
getItemCount() |
protected android.view.View |
getRowView(android.content.Context context)
Creates an empty
ManeuverItemView to be used as view holder. |
UnitSystem |
getUnitSystem()
Returns current unit system of this adapter.
|
void |
onBindViewHolder(ManeuverListAdapter.ViewHolder holder,
int position) |
ManeuverListAdapter.ViewHolder |
onCreateViewHolder(android.view.ViewGroup parent,
int viewType) |
void |
setUnitSystem(UnitSystem unitSystem)
Sets unit system of this adapter.
|
bindViewHolder, createViewHolder, findRelativeAdapterPositionIn, getItemId, getItemViewType, getStateRestorationPolicy, hasObservers, hasStableIds, notifyDataSetChanged, notifyItemChanged, notifyItemChanged, notifyItemInserted, notifyItemMoved, notifyItemRangeChanged, notifyItemRangeChanged, notifyItemRangeInserted, notifyItemRangeRemoved, notifyItemRemoved, onAttachedToRecyclerView, onBindViewHolder, onDetachedFromRecyclerView, onFailedToRecycleView, onViewAttachedToWindow, onViewDetachedFromWindow, onViewRecycled, registerAdapterDataObserver, setHasStableIds, setStateRestorationPolicy, unregisterAdapterDataObserver
public ManeuverListAdapter(java.util.List<com.here.android.mpa.routing.Maneuver> maneuverList)
maneuverList
- a list of maneuvers.public void setUnitSystem(UnitSystem unitSystem)
unitSystem
- unit system UnitSystem
.public UnitSystem getUnitSystem()
UnitSystem
.public ManeuverListAdapter.ViewHolder onCreateViewHolder(android.view.ViewGroup parent, int viewType)
onCreateViewHolder
in class androidx.recyclerview.widget.RecyclerView.Adapter<ManeuverListAdapter.ViewHolder>
protected android.view.View getRowView(android.content.Context context)
ManeuverItemView
to be used as view holder.
Override this method to set a custom view holder for a row.
context
- the required context.ManeuverItemView
.public void onBindViewHolder(ManeuverListAdapter.ViewHolder holder, int position)
onBindViewHolder
in class androidx.recyclerview.widget.RecyclerView.Adapter<ManeuverListAdapter.ViewHolder>
public int getItemCount()
getItemCount
in class androidx.recyclerview.widget.RecyclerView.Adapter<ManeuverListAdapter.ViewHolder>