Change Nav bar style to use system nav (new style for Nexus N+)
Bug: 27612740 Change-Id: I309cf8252285130a0e1d2c03ca664706e73cce16
This commit is contained in:
@@ -385,7 +385,6 @@ public class SettingsActivity extends SettingsDrawerActivity
|
||||
private boolean mIsShowingDashboard;
|
||||
private boolean mIsShortcut;
|
||||
|
||||
private int mMainContentId = R.id.main_content;
|
||||
private ViewGroup mContent;
|
||||
|
||||
private SearchView mSearchView;
|
||||
@@ -558,7 +557,7 @@ public class SettingsActivity extends SettingsDrawerActivity
|
||||
setContentView(mIsShowingDashboard ?
|
||||
R.layout.settings_main_dashboard : R.layout.settings_main_prefs);
|
||||
|
||||
mContent = (ViewGroup) findViewById(mMainContentId);
|
||||
mContent = (ViewGroup) findViewById(R.id.main_content);
|
||||
|
||||
getFragmentManager().addOnBackStackChangedListener(this);
|
||||
|
||||
@@ -687,14 +686,6 @@ public class SettingsActivity extends SettingsDrawerActivity
|
||||
+ " ms");
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the id of the view containing the main content. Should be called before calling super's
|
||||
* onCreate.
|
||||
*/
|
||||
protected void setMainContentId(int contentId) {
|
||||
mMainContentId = contentId;
|
||||
}
|
||||
|
||||
private void setTitleFromIntent(Intent intent) {
|
||||
final int initialTitleResId = intent.getIntExtra(EXTRA_SHOW_FRAGMENT_TITLE_RESID, -1);
|
||||
if (initialTitleResId > 0) {
|
||||
@@ -975,7 +966,7 @@ public class SettingsActivity extends SettingsDrawerActivity
|
||||
*/
|
||||
public void startPreferenceFragment(Fragment fragment, boolean push) {
|
||||
FragmentTransaction transaction = getFragmentManager().beginTransaction();
|
||||
transaction.replace(mMainContentId, fragment);
|
||||
transaction.replace(R.id.main_content, fragment);
|
||||
if (push) {
|
||||
transaction.setTransition(FragmentTransaction.TRANSIT_FRAGMENT_OPEN);
|
||||
transaction.addToBackStack(BACK_STACK_PREFS);
|
||||
@@ -996,7 +987,7 @@ public class SettingsActivity extends SettingsDrawerActivity
|
||||
}
|
||||
Fragment f = Fragment.instantiate(this, fragmentName, args);
|
||||
FragmentTransaction transaction = getFragmentManager().beginTransaction();
|
||||
transaction.replace(mMainContentId, f);
|
||||
transaction.replace(R.id.main_content, f);
|
||||
if (withTransition) {
|
||||
TransitionManager.beginDelayedTransition(mContent);
|
||||
}
|
||||
@@ -1193,7 +1184,7 @@ public class SettingsActivity extends SettingsDrawerActivity
|
||||
if (mSearchResultsFragment != null) {
|
||||
return;
|
||||
}
|
||||
Fragment current = getFragmentManager().findFragmentById(mMainContentId);
|
||||
Fragment current = getFragmentManager().findFragmentById(R.id.main_content);
|
||||
if (current != null && current instanceof SearchResultsSummary) {
|
||||
mSearchResultsFragment = (SearchResultsSummary) current;
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user