Code example for FragmentActivity

Methods: getApplication, getResources, onCreate

0
        ActivityMixin.helpDialog(this, title, message, icon);
    } 
 
    @Override 
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        initializeCommonFields(); 
    } 
 
    protected static void disableSuggestions(final EditText edit) {
        Compatibility.disableSuggestions(edit);
    } 
 
    protected void restartActivity() { 
        Compatibility.restartActivity(this);
    } 
 
    @Override 
    public void invalidateOptionsMenuCompatible() { 
        ActivityMixin.invalidateOptionsMenu(this);
    } 
 
    protected void onCreate(final Bundle savedInstanceState, final int resourceLayoutID) {
        super.onCreate(savedInstanceState);
 
        initializeCommonFields(); 
 
        // non declarative part of layout 
        setTheme(); 
        setContentView(resourceLayoutID);
 
        // create view variables 
        Views.inject(this);
    } 
 
    private void initializeCommonFields() { 
        // initialize commonly used members 
        res = this.getResources();
        app = (CgeoApplication) this.getApplication();
 
        // only needed in some activities, but implemented in super class nonetheless 
        Cookies.restoreCookieStore(Settings.getCookieStore()); 
        ActivityMixin.keepScreenOn(this, keepScreenOn);
    }