Search in sources :

Example 1 with MediaControlInterface

use of com.zype.android.ui.video_details.fragments.video.MediaControlInterface in project zype-android by zype.

the class BaseVideoActivity method showFragment.

private void showFragment(Fragment fragment) {
    Logger.d("showFragment()");
    hideProgress();
    if (mInterface != null) {
        mInterface.stop();
    }
    FragmentManager fragmentManager = getSupportFragmentManager();
    FragmentTransaction fragmentTransaction = fragmentManager.beginTransaction();
    if (fragment instanceof MediaControlInterface) {
        mInterface = (MediaControlInterface) fragment;
    }
    fragmentTransaction.replace(R.id.video_container, fragment, FRAGMENT_TAG_PLAYER);
    fragmentTransaction.commit();
}
Also used : FragmentManager(androidx.fragment.app.FragmentManager) MediaControlInterface(com.zype.android.ui.video_details.fragments.video.MediaControlInterface) FragmentTransaction(androidx.fragment.app.FragmentTransaction)

Aggregations

FragmentManager (androidx.fragment.app.FragmentManager)1 FragmentTransaction (androidx.fragment.app.FragmentTransaction)1 MediaControlInterface (com.zype.android.ui.video_details.fragments.video.MediaControlInterface)1