Code example for FragmentActivity

Methods: getSupportFragmentManager, getSystemService, onCreate

0
    protected ViewPager mViewPager;
    protected List<Fragment> mListFragments;
 
    @Override 
    public void onCreate(final Bundle icicle) {
        super.onCreate(icicle);
        mSharedPreferences = PreferenceManager.getDefaultSharedPreferences(this);
        PublicUtils.setupFullscreen(this, mSharedPreferences);
        PublicUtils.restoreCookies(this, icicle);
        PublicUtils.setupLocale(this, mSharedPreferences);
        mLayoutInflater = (LayoutInflater) getSystemService(Context.LAYOUT_INFLATER_SERVICE);
        mFragmentManager = getSupportFragmentManager();
    } 
 
    @Override 
    public void onResume() { 
        super.onResume(); 
        PublicUtils.setupLocale(this, mSharedPreferences);
        PublicUtils.setupSession(this, mSharedPreferences);
    }