app/src/main/java/fr/free/nrw/commons/category/CategoryDetailsActivity.java
@Override
    public void onItemClick(AdapterView<?> adapterView, View view, int i, long l) {
        tabLayout.setVisibility(View.GONE);
        viewPager.setVisibility(View.GONE);
        mediaContainer.setVisibility(View.VISIBLE);
        if (mediaDetails == null || !mediaDetails.isVisible()) {
            // set isFeaturedImage true for featured images, to include author field on media detail
            mediaDetails = new MediaDetailPagerFragment(false, true);
            FragmentManager supportFragmentManager = getSupportFragmentManager();
            supportFragmentManager
                    .beginTransaction()
                    .replace(R.id.mediaContainer, mediaDetails)
                    .addToBackStack(null)
                    .commit();
            supportFragmentManager.executePendingTransactions();
        }
        mediaDetails.showImage(i);
        forceInitBackButton();
    }
/**
     * This method is called onClick of media inside category details (CategoryImageListFragment).
     */
This method is called onClick of media inside category details (CategoryImageListFragment).
This method is called onClick of media inside category details ( CategoryImageListFragment ) .
@Override
    public void onItemClick(AdapterView<?> adapterView, View view, int i, long l) {
        tabLayout.setVisibility(View.GONE);
        viewPager.setVisibility(View.GONE);
        mediaContainer.setVisibility(View.VISIBLE);
        if (mediaDetails == null || !mediaDetails.isVisible()) {
            mediaDetails = new MediaDetailPagerFragment(false, true);
            FragmentManager supportFragmentManager = getSupportFragmentManager();
            supportFragmentManager
                    .beginTransaction()
                    .replace(R.id.mediaContainer, mediaDetails)
                    .addToBackStack(null)
                    .commit();
            supportFragmentManager.executePendingTransactions();
        }
        mediaDetails.showImage(i);
        forceInitBackButton();
    }
@ Override public void onItemClick ( AdapterView < ? > adapterView , View view , int i , long l ) { tabLayout . setVisibility ( View . GONE ) ; viewPager . setVisibility ( View . GONE ) ; mediaContainer . setVisibility ( View . VISIBLE ) ; if ( mediaDetails == null || ! mediaDetails . isVisible ( ) ) { mediaDetails = new MediaDetailPagerFragment ( false , true ) ; FragmentManager supportFragmentManager = getSupportFragmentManager ( ) ; supportFragmentManager . beginTransaction ( ) . replace ( R . id . mediaContainer , mediaDetails ) . addToBackStack ( null ) . commit ( ) ; supportFragmentManager . executePendingTransactions ( ) ; } mediaDetails . showImage ( i ) ; forceInitBackButton ( ) ; }
This method is called onClick of media inside category details (CategoryImageListFragment).
This method is called onClick of media inside category details ( CategoryImageListFragment ) .
// set isFeaturedImage true for featured images, to include author field on media detail