I am working on a Android app since I am new I can't find a way to get the fragment class name ReadFragment into the Adapter onBindViewHolder method.Any hint how can I get the class name or index of the fragment since I am using 2 fragments and want to display diferent data in each.
Fragment:
public class ReadFragment extends Fragment {
View view;
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
return view;
}
Adapter
@Override
public void onBindViewHolder(@NonNull ViewHolder holder, int position) {}