FileDocCategorySizeDatePackage
FragmentCompat.javaAPI DocAndroid 5.1 API2680Thu Mar 12 22:22:56 GMT 2015android.support.v13.app

FragmentCompat

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
IMPL
Constructors Summary
Methods Summary
public static voidsetMenuVisibility(android.app.Fragment 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(android.app.Fragment f, boolean deferStart)
Call {@link Fragment#setUserVisibleHint(boolean) setUserVisibleHint(boolean)} if running on an appropriate version of the platform.

        IMPL.setUserVisibleHint(f, deferStart);