Code example for FragmentActivity

Methods: getApplication, getResources

0
        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);
    } 
 
    @Override 
    public void setContentView(int layoutResID) {
        super.setContentView(layoutResID);
 
        // initialize the action bar title with the activity title for single source 
        ActivityMixin.setTitle(this, getTitle());
    }