FragmentCompat.javaAPI DocAndroid 5.1 API2680Thu Mar 12 22:22:56 GMT


public class FragmentCompat extends Object
Helper for accessing features in {@link Fragment} introduced after API level 13 in a backwards compatible fashion.

Fields Summary
static final FragmentCompatImpl
Constructors Summary
Methods Summary
public static voidsetMenuVisibility( f, boolean visible)
Call {@link Fragment#setMenuVisibility(boolean) Fragment.setMenuVisibility(boolean)} if running on an appropriate version of the platform.

        if (android.os.Build.VERSION.SDK_INT >= 15) {
            IMPL = new ICSMR1FragmentCompatImpl();
        } else if (android.os.Build.VERSION.SDK_INT >= 14) {
            IMPL = new ICSFragmentCompatImpl();
        } else {
            IMPL = new BaseFragmentCompatImpl();
        IMPL.setMenuVisibility(f, visible);
public static voidsetUserVisibleHint( f, boolean deferStart)
Call {@link Fragment#setUserVisibleHint(boolean) setUserVisibleHint(boolean)} if running on an appropriate version of the platform.

        IMPL.setUserVisibleHint(f, deferStart);