set number to recyclerview list using recyclerview holder code example
Example 1: androidx recyclerview dependency
dependencies {
implementation "androidx.recyclerview:recyclerview:1.1.0"
implementation "androidx.recyclerview:recyclerview-selection:1.1.0-rc01"
}
Example 2: recyclerview layout oncreatw
@Override
public ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
View view = LayoutInflater.from(parent.getContext()).inflate(R.layout.layout_listitem,parent,false);
ViewHolder Holder = new ViewHolder(view);
return Holder;
}