Code example for FragmentActivity

Methods: getTitle, setContentView

0
        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());
    } 
 
    protected void hideKeyboard() { 
        ((InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE)).toggleSoftInput(InputMethodManager.SHOW_IMPLICIT, 0);
    } 
}