get Low Level Fragment Manager - Android User Interface

Android examples for User Interface:Fragment

Description

get Low Level Fragment Manager

Demo Code


//package com.java2s;
import android.support.v4.app.Fragment;

import android.support.v4.app.FragmentManager;

public class Main {
    public static FragmentManager getLowLevelFragmentManager(
            Fragment fragment) {/* ww w  . j av a2  s . com*/

        Fragment parentFragment = fragment.getParentFragment();

        if (parentFragment != null) {
            return getLowLevelFragmentManager(parentFragment);
        }
        return fragment.getFragmentManager();

    }
}

Related Tutorials