I want to open a new Fragment called optionsFragment
from my RecyclerView Adapter onlick. I tried a lot of tutorials but I'm too stupid for this.
The new fragment should be has a back arrow button at the left top corner to go back to the RecyclerView.
Please help me.
This is my onClick function for my holder in the adapter:
FragmentManager benutzerlisteManager = ((NavigationDrawerActivity)customContext).getSupportFragmentManager();
BenutzerOverviewFragment benutzerOverviewFragment = new BenutzerOverviewFragment();
benutzerlisteManager.beginTransaction().replace(R.id.content_navigation_drawer,
benutzerOverviewFragment,
benutzerOverviewFragment.getTag())
.addToBackStack(null)
.commit();
I've tried the code at the top but the app is crashing with this error:
NavigationDrawerActivity@b42040b must implement OnFragmentInteractionListener