Beispiel #1
0
 @Override
 public void onDestroy() {
   SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(this);
   prefs.unregisterOnSharedPreferenceChangeListener(this);
   super.onDestroy();
   SettingsManager.save();
 }
Beispiel #2
0
 @Override
 protected void onPostCreate(Bundle savedInstanceState) {
   super.onPostCreate(savedInstanceState);
   LinearLayout root =
       (LinearLayout) findViewById(android.R.id.list).getParent().getParent().getParent();
   Toolbar bar =
       (Toolbar) LayoutInflater.from(this).inflate(R.layout.settings_toolbar, null, false);
   bar.setNavigationOnClickListener(
       new View.OnClickListener() {
         @Override
         public void onClick(View v) {
           onBackPressed();
         }
       });
   root.addView(bar, 0);
 }
Beispiel #3
0
 @Override
 protected void onResume() {
   super.onResume();
   ThemeManager.applyTheme(this);
 }
Beispiel #4
0
 @Override
 public void onCreate(Bundle savedInstanceState) {
   super.onCreate(savedInstanceState);
   SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(this);
   prefs.registerOnSharedPreferenceChangeListener(this);
 }