Code example for FragmentActivity

Methods: getApplication

0
	private boolean mIsDarkTheme, mHardwareAccelerated;
 
	private boolean mInstanceStateSaved;
 
	public TwidereApplication getTwidereApplication() { 
		return (TwidereApplication) getApplication(); 
	} 
 
	@Override 
	public boolean isThemeChanged() { 
		final SharedPreferences preferences = getSharedPreferences(SHARED_PREFERENCES_NAME, Context.MODE_PRIVATE);
		final boolean is_dark_theme = preferences.getBoolean(PREFERENCE_KEY_DARK_THEME, false);
		return is_dark_theme != mIsDarkTheme;
	} 
 
	@Override 
	public void onCreate(final Bundle savedInstanceState) {
		setHardwareAcceleration(); 
		setTheme(); 
		super.onCreate(savedInstanceState);
	}