Update Settings redlines per UX request

See bug: #15384992 Setting Dashboard - padding updates

Change-Id: Ie95b6cee701847d7f76f2e2a72aaf8fc64bc4dd9
This commit is contained in:
Fabrice Di Meglio
2014-06-10 17:12:51 -07:00
parent 65b145e6d5
commit da8babaedf
7 changed files with 57 additions and 22 deletions

View File

@@ -456,6 +456,20 @@ public class SettingsActivity extends Activity
super.onCreate(savedState);
// Getting Intent properties can only be done after the super.onCreate(...)
final String initialFragmentName = getIntent().getStringExtra(EXTRA_SHOW_FRAGMENT);
mIsShowingDashboard = (initialFragmentName == null);
final ComponentName cn = getIntent().getComponent();
final boolean isShortcut = !cn.getClassName().equals(SubSettings.class.getName());
// If this is a subsettings (but not a Shortcut) then apply the correct theme for
// the ActionBar content inset
if (!mIsShowingDashboard && !isShortcut) {
setTheme(R.style.Theme_SubSettings);
}
setContentView(R.layout.settings_main);
mContent = (ViewGroup) findViewById(R.id.prefs);
@@ -465,11 +479,6 @@ public class SettingsActivity extends Activity
mDisplayHomeAsUpEnabled = true;
mDisplaySearch = true;
// Getting Intent properties can only be done after the super.onCreate(...)
final String initialFragmentName = getIntent().getStringExtra(EXTRA_SHOW_FRAGMENT);
mIsShowingDashboard = (initialFragmentName == null);
if (mIsShowingDashboard) {
Index.getInstance(getApplicationContext()).update();
}
@@ -494,9 +503,8 @@ public class SettingsActivity extends Activity
mDisplaySearch = savedState.getBoolean(SAVE_KEY_SHOW_SEARCH);
} else {
if (!mIsShowingDashboard) {
final ComponentName cn = getIntent().getComponent();
// No UP nor Search is shown we are launched thru a Settings "shortcut"
if (!cn.getClassName().equals(SubSettings.class.getName())) {
if (isShortcut) {
mDisplayHomeAsUpEnabled = false;
mDisplaySearch = false;
}