use of de.danoeh.antennapod.preferences.PreferenceController in project AntennaPod by AntennaPod.
the class PreferenceActivity method onCreate.
@TargetApi(Build.VERSION_CODES.HONEYCOMB)
@Override
protected void onCreate(Bundle savedInstanceState) {
// This must be the FIRST thing we do, otherwise other code may not have the
// reference it needs
instance = new WeakReference<>(this);
setTheme(UserPreferences.getTheme());
super.onCreate(savedInstanceState);
ActionBar ab = getSupportActionBar();
if (ab != null) {
ab.setDisplayHomeAsUpEnabled(true);
}
// set up layout
FrameLayout root = new FrameLayout(this);
root.setId(R.id.content);
root.setLayoutParams(new FrameLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT));
setContentView(root);
// we need to create the PreferenceController before the MainFragment
// since the MainFragment depends on the preferenceController already being created
preferenceController = new PreferenceController(preferenceUI);
prefFragment = new MainFragment();
getFragmentManager().beginTransaction().replace(R.id.content, prefFragment).commit();
}
use of de.danoeh.antennapod.preferences.PreferenceController in project AntennaPod by AntennaPod.
the class PreferenceActivityGingerbread method onCreate.
@SuppressLint("NewApi")
@SuppressWarnings("deprecation")
@Override
public void onCreate(Bundle savedInstanceState) {
setTheme(UserPreferences.getTheme());
super.onCreate(savedInstanceState);
addPreferencesFromResource(R.xml.preferences);
preferenceController = new PreferenceController(preferenceUI);
preferenceController.onCreate();
}
Aggregations