app/src/main/java/fr/free/nrw/commons/category/CategoryDetailsActivity.java
@Override
    public void onBackPressed() {
        if (supportFragmentManager.getBackStackEntryCount() == 1){
            // back to search so show search toolbar and hide navigation toolbar
            tabLayout.setVisibility(View.VISIBLE);
            viewPager.setVisibility(View.VISIBLE);
            mediaContainer.setVisibility(View.GONE);
        }
        super.onBackPressed();
    }
/**
     * This method is called on backPressed of anyFragment in the activity.
     * If condition is called when mediaDetailFragment is opened.
     */
This method is called on backPressed of anyFragment in the activity.
If condition is called when mediaDetailFragment is opened.
This method is called on backPressed of anyFragment in the activity . If condition is called when mediaDetailFragment is opened .
@Override
    public void onBackPressed() {
        if (supportFragmentManager.getBackStackEntryCount() == 1){
            tabLayout.setVisibility(View.VISIBLE);
            viewPager.setVisibility(View.VISIBLE);
            mediaContainer.setVisibility(View.GONE);
        }
        super.onBackPressed();
    }
@ Override public void onBackPressed ( ) { if ( supportFragmentManager . getBackStackEntryCount ( ) == 1 ) { tabLayout . setVisibility ( View . VISIBLE ) ; viewPager . setVisibility ( View . VISIBLE ) ; mediaContainer . setVisibility ( View . GONE ) ; } super . onBackPressed ( ) ; }
This method is called on backPressed of anyFragment in the activity.
This method is called on backPressed of anyFragment in the activity .
// back to search so show search toolbar and hide navigation toolbar