Search in sources :

Example 1 with GifFragment

use of cuneyt.example.com.gifview.Fragments.GifFragment in project GifView by Cutta.

the class MainActivity method openFragment.

public void openFragment() {
    FragmentTransaction trans = getSupportFragmentManager().beginTransaction();
    GifFragment fragmentLocal = GifFragment.newInstance();
    fragmentLocal.setHasOptionsMenu(true);
    trans.replace(R.id.frame, fragmentLocal, fragmentLocal.getTAG());
    trans.setTransition(FragmentTransaction.TRANSIT_FRAGMENT_OPEN);
    trans.addToBackStack(fragmentLocal.getTAG());
    trans.commitAllowingStateLoss();
}
Also used : FragmentTransaction(androidx.fragment.app.FragmentTransaction) GifFragment(cuneyt.example.com.gifview.Fragments.GifFragment)

Aggregations

FragmentTransaction (androidx.fragment.app.FragmentTransaction)1 GifFragment (cuneyt.example.com.gifview.Fragments.GifFragment)1