i have a viewpager activity containing fragment named OneFragment.
The Onefragment contains a recyclerview,on items click a fragment called DescriptionFragment opens.
This is how i opened the DescriptionFragment from the Adapter:
Fragment descriptionFragment = new DescriptionFragment ();
FragmentTransaction transaction = mContext.beginTransaction();
transaction.replace(R.id.framelayout, descriptionFragment).addToBackStack(null).commit();
Problem: When i click on backpress button the app finishes.
I want on backpress to close the DescriptionFragment and return back to the OneFragment