Fix up-navigation for different levels of Settings screens.
No up affordance for 2-pane screens since there's already a fragment breadcrumb for navigating up. Bug: 6452961 Change-Id: Iad9a5c2d0b68cc8f2aec7d5ed8e2ab14d023d48c
This commit is contained in:
@@ -143,9 +143,11 @@ public class Settings extends PreferenceActivity implements ButtonBarHandler {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO Add support for android.R.id.home in all Setting's onOptionsItemSelected
|
// Override up navigation for multi-pane, since we handle it in the fragment breadcrumbs
|
||||||
// getActionBar().setDisplayOptions(ActionBar.DISPLAY_HOME_AS_UP,
|
if (onIsMultiPane()) {
|
||||||
// ActionBar.DISPLAY_HOME_AS_UP);
|
getActionBar().setDisplayHomeAsUpEnabled(false);
|
||||||
|
getActionBar().setHomeButtonEnabled(false);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -602,6 +604,10 @@ public class Settings extends PreferenceActivity implements ButtonBarHandler {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean shouldUpRecreateTask(Intent targetIntent) {
|
||||||
|
return super.shouldUpRecreateTask(new Intent(this, Settings.class));
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setListAdapter(ListAdapter adapter) {
|
public void setListAdapter(ListAdapter adapter) {
|
||||||
if (mHeaders == null) {
|
if (mHeaders == null) {
|
||||||
|
@@ -21,4 +21,10 @@ package com.android.settings;
|
|||||||
* since for our app it is a special singleTask class.
|
* since for our app it is a special singleTask class.
|
||||||
*/
|
*/
|
||||||
public class SubSettings extends Settings {
|
public class SubSettings extends Settings {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean onNavigateUp() {
|
||||||
|
finish();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user