Merge pull request #1066 from TomHennen/resolve_race_condition
create PreferenceController before the main fragment
This commit is contained in:
commit
57fde20d71
|
@ -60,10 +60,13 @@ public class PreferenceActivity extends ActionBarActivity {
|
|||
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();
|
||||
|
||||
preferenceController = new PreferenceController(preferenceUI);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Reference in New Issue