public class MainActivityAdapter extends androidx.recyclerview.widget.RecyclerView.Adapter<MainActivityAdapter.Item>
Modifier and Type | Class and Description |
---|---|
class |
MainActivityAdapter.Item
Class implementation for the recycler view.
|
Modifier and Type | Field and Description |
---|---|
private Hashtable<Integer,ArrayList<LandItem>> |
hashCodes |
private android.app.Activity |
mainActivity |
private int |
resource |
Constructor and Description |
---|
MainActivityAdapter(Hashtable<Integer,ArrayList<LandItem>> hashCodes,
int resource,
android.app.Activity mainActivity)
Constructor of the main activity adapter.
|
Modifier and Type | Method and Description |
---|---|
int |
getItemCount()
Get the item count.
|
void |
onBindViewHolder(MainActivityAdapter.Item holder,
int position)
Take action on the view holder.
|
MainActivityAdapter.Item |
onCreateViewHolder(android.view.ViewGroup parent,
int viewType)
Take action on the view holder creation.
|
bindViewHolder, createViewHolder, getItemId, getItemViewType, hasObservers, hasStableIds, notifyDataSetChanged, notifyItemChanged, notifyItemChanged, notifyItemInserted, notifyItemMoved, notifyItemRangeChanged, notifyItemRangeChanged, notifyItemRangeInserted, notifyItemRangeRemoved, notifyItemRemoved, onAttachedToRecyclerView, onBindViewHolder, onDetachedFromRecyclerView, onFailedToRecycleView, onViewAttachedToWindow, onViewDetachedFromWindow, onViewRecycled, registerAdapterDataObserver, setHasStableIds, unregisterAdapterDataObserver
@NonNull public MainActivityAdapter.Item onCreateViewHolder(@NonNull android.view.ViewGroup parent, int viewType)
onCreateViewHolder
in class androidx.recyclerview.widget.RecyclerView.Adapter<MainActivityAdapter.Item>
parent
- Viewgroup parent, that cant be null.viewType
- View type code.RecyclerView.Adapter.getItemViewType(int)
,
#onBindViewHolder(ViewHolder, int)
public void onBindViewHolder(@NonNull MainActivityAdapter.Item holder, int position)
onBindViewHolder
in class androidx.recyclerview.widget.RecyclerView.Adapter<MainActivityAdapter.Item>
holder
- Item holder, that cant be null.position
- Position code.public int getItemCount()
getItemCount
in class androidx.recyclerview.widget.RecyclerView.Adapter<MainActivityAdapter.Item>