There is a recyclerView list in which I initialize the names:
private void initName() { categories = new ArrayList<>(); categories.add(new Category(getString(R.string.one))); categories.add(new Category(getString(R.string.two))); categories.add(new Category(getString(R.string.three))); categories.add(new Category(getString(R.string.four))); categories.add(new Category(getString(R.string.five))); categories.add(new Category(getString(R.string.six))); } Where further for each name I make the transition, approximately as follows:
private void initializeAdapter() { Adapter adapter = new Adapter(categories, position -> { Intent intent; switch (position) { case 0: intent = new Intent(getActivity(), One.class); break; The task is to transfer / click on the names with the SharedPreference into some kind of activity (something like the favorites).