use of xyz.monkeytong.hongbao.fragments.GeneralSettingsFragment in project WeChatLuckyMoney by geeeeeeeeek.
the class SettingsActivity method prepareSettings.
private void prepareSettings() {
String title, fragId;
Bundle bundle = getIntent().getExtras();
if (bundle != null) {
title = bundle.getString("title");
fragId = bundle.getString("frag_id");
} else {
title = getString(R.string.preference);
fragId = "GeneralSettingsFragment";
}
TextView textView = (TextView) findViewById(R.id.settings_bar);
textView.setText(title);
FragmentManager fragmentManager = getFragmentManager();
FragmentTransaction fragmentTransaction = fragmentManager.beginTransaction();
if ("GeneralSettingsFragment".equals(fragId)) {
fragmentTransaction.replace(R.id.preferences_fragment, new GeneralSettingsFragment());
} else if ("CommentSettingsFragment".equals(fragId)) {
fragmentTransaction.replace(R.id.preferences_fragment, new CommentSettingsFragment());
}
fragmentTransaction.commit();
}
Aggregations