public class CharacterEditorAdapter extends androidx.recyclerview.widget.RecyclerView.Adapter<CharacterEditorAdapter.Item>
Modifier and Type | Class and Description |
---|---|
class |
CharacterEditorAdapter.Item |
Modifier and Type | Field and Description |
---|---|
private android.app.Activity |
activity |
private CharacterItem |
characterItem |
private int |
resource |
Constructor and Description |
---|
CharacterEditorAdapter(CharacterItem characterItem,
int resource,
android.app.Activity activity)
Constructor of the character editor.
|
Modifier and Type | Method and Description |
---|---|
CharacterItem |
getCharacterItem()
Return the character item
|
int |
getItemCount()
Method to obtain the item count.
|
void |
onBindViewHolder(CharacterEditorAdapter.Item holder,
int position)
Method to act over the view holder for the edition of the costs af the lands for the character.
|
CharacterEditorAdapter.Item |
onCreateViewHolder(android.view.ViewGroup parent,
int viewType)
Method called by system on the creation of the view.
|
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
private CharacterItem characterItem
private int resource
private android.app.Activity activity
public CharacterEditorAdapter(CharacterItem characterItem, int resource, android.app.Activity activity)
characterItem
- Character.resource
- Resource code.activity
- Activity context.public CharacterItem getCharacterItem()
@NonNull public CharacterEditorAdapter.Item onCreateViewHolder(@NonNull android.view.ViewGroup parent, int viewType)
onCreateViewHolder
in class androidx.recyclerview.widget.RecyclerView.Adapter<CharacterEditorAdapter.Item>
parent
- View group that cant be null.viewType
- View type code.RecyclerView.Adapter.getItemViewType(int)
,
#onBindViewHolder(ViewHolder, int)
public void onBindViewHolder(@NonNull CharacterEditorAdapter.Item holder, int position)
onBindViewHolder
in class androidx.recyclerview.widget.RecyclerView.Adapter<CharacterEditorAdapter.Item>
holder
- Item that cant be null.position
- Position code.public int getItemCount()
getItemCount
in class androidx.recyclerview.widget.RecyclerView.Adapter<CharacterEditorAdapter.Item>