Search in sources :

Example 1 with MainPreferencesFragment

use of de.danoeh.antennapod.fragment.preferences.MainPreferencesFragment in project AntennaPod by AntennaPod.

the class PreferenceActivity method onCreate.

@Override
protected void onCreate(Bundle savedInstanceState) {
    setTheme(UserPreferences.getTheme());
    super.onCreate(savedInstanceState);
    ActionBar ab = getSupportActionBar();
    if (ab != null) {
        ab.setDisplayHomeAsUpEnabled(true);
    }
    final SettingsActivityBinding binding = SettingsActivityBinding.inflate(getLayoutInflater());
    setContentView(binding.getRoot());
    if (getSupportFragmentManager().findFragmentByTag(FRAGMENT_TAG) == null) {
        getSupportFragmentManager().beginTransaction().replace(R.id.settingsContainer, new MainPreferencesFragment(), FRAGMENT_TAG).commit();
    }
    Intent intent = getIntent();
    if (intent.getBooleanExtra(OPEN_AUTO_DOWNLOAD_SETTINGS, false)) {
        openScreen(R.xml.preferences_autodownload);
    }
}
Also used : SettingsActivityBinding(de.danoeh.antennapod.databinding.SettingsActivityBinding) MainPreferencesFragment(de.danoeh.antennapod.fragment.preferences.MainPreferencesFragment) Intent(android.content.Intent) ActionBar(androidx.appcompat.app.ActionBar)

Aggregations

Intent (android.content.Intent)1 ActionBar (androidx.appcompat.app.ActionBar)1 SettingsActivityBinding (de.danoeh.antennapod.databinding.SettingsActivityBinding)1 MainPreferencesFragment (de.danoeh.antennapod.fragment.preferences.MainPreferencesFragment)1