Class DynamicPermissionsAdapter
java.lang.Object
androidx.recyclerview.widget.RecyclerView.Adapter<DynamicPermissionsAdapter.ViewHolder>
com.pranavpandey.android.dynamic.support.permission.adapter.DynamicPermissionsAdapter
public class DynamicPermissionsAdapter
extends RecyclerView.Adapter<DynamicPermissionsAdapter.ViewHolder>
A
RecyclerView.Adapter
to show the DynamicPermissions
.-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
View holder to hold the permission root. -
Constructor Summary
ConstructorDescriptionDynamicPermissionsAdapter
(List<DynamicPermission> data, DynamicPermissionsView.PermissionListener permissionListener) Constructor to initialize an object of this class. -
Method Summary
Modifier and TypeMethodDescriptiongetItem
(int position) Get the dynamic permission for a given position.int
void
onBindViewHolder
(DynamicPermissionsAdapter.ViewHolder holder, int position) onCreateViewHolder
(ViewGroup viewGroup, int viewType) Methods inherited from class androidx.recyclerview.widget.RecyclerView.Adapter
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
-
Constructor Details
-
Method Details
-
onCreateViewHolder
@NonNull public DynamicPermissionsAdapter.ViewHolder onCreateViewHolder(@NonNull ViewGroup viewGroup, int viewType) - Specified by:
onCreateViewHolder
in classRecyclerView.Adapter<DynamicPermissionsAdapter.ViewHolder>
-
getItemCount
public int getItemCount()- Specified by:
getItemCount
in classRecyclerView.Adapter<DynamicPermissionsAdapter.ViewHolder>
-
getItem
Get the dynamic permission for a given position.- Parameters:
position
- The position of the adapter.- Returns:
- The dynamic permission according to the supplied position.
-