diff options
author | Jorge Ruesga <jorge@ruesga.com> | 2013-05-25 19:07:03 +0200 |
---|---|---|
committer | Jorge Ruesga <jorge@ruesga.com> | 2013-05-25 19:25:11 +0200 |
commit | 0ea76d07fb811247450b0cc88cd744ac51c11970 (patch) | |
tree | 8376f4ceb0cb532c015746513c486cea230fd440 /src | |
parent | 08888e987c53305b27381479e4a6957ae4fd9944 (diff) | |
download | packages_apps_trebuchet-0ea76d07fb811247450b0cc88cd744ac51c11970.zip packages_apps_trebuchet-0ea76d07fb811247450b0cc88cd744ac51c11970.tar.gz packages_apps_trebuchet-0ea76d07fb811247450b0cc88cd744ac51c11970.tar.bz2 |
Trebuchet: Better layout for isScreenLarge devices
This change increase the space for the shortcuts at hotseat to fit the workspace on
isScreenLarge devices. Also deactivate and remove the stretch screen setting, because
the dimensions are always calculated on these devices. Also this change configures the
space between hotseat pages to avoid to display icons for other pages in the current
hotseat page.
Patchset 2: Added nebkat suggestions
Screenshots from TF700T:
Landscape -> https://sharecloud.ruesga.com/public.php?service=files&t=efede324ade05db79878eac13e637301
Portrait -> https://sharecloud.ruesga.com/public.php?service=files&t=79a7002a73e167eed08a195c4cf3d05c
Change-Id: I061303ce2ac78f3e7f7b13c4a25602b14e991e99
JIRA: CYAN-502
Issue: https://jira.cyanogenmod.org/browse/CYAN-502
Signed-off-by: Jorge Ruesga <jorge@ruesga.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/com/cyanogenmod/trebuchet/Workspace.java | 4 | ||||
-rw-r--r-- | src/com/cyanogenmod/trebuchet/preference/Preferences.java | 16 |
2 files changed, 15 insertions, 5 deletions
diff --git a/src/com/cyanogenmod/trebuchet/Workspace.java b/src/com/cyanogenmod/trebuchet/Workspace.java index 10ef99d..0213bd8 100644 --- a/src/com/cyanogenmod/trebuchet/Workspace.java +++ b/src/com/cyanogenmod/trebuchet/Workspace.java @@ -392,6 +392,10 @@ public class Workspace extends PagedView } mStretchScreens = PreferencesProvider.Interface.Homescreen.getStretchScreens(); + // Large screen has calculated dimensions always + if (LauncherApplication.isScreenLarge()) { + mStretchScreens = false; + } mShowSearchBar = PreferencesProvider.Interface.Homescreen.getShowSearchBar(); mShowHotseat = PreferencesProvider.Interface.Dock.getShowDock(); mHideIconLabels = PreferencesProvider.Interface.Homescreen.getHideIconLabels(); diff --git a/src/com/cyanogenmod/trebuchet/preference/Preferences.java b/src/com/cyanogenmod/trebuchet/preference/Preferences.java index 9b39960..77f553e 100644 --- a/src/com/cyanogenmod/trebuchet/preference/Preferences.java +++ b/src/com/cyanogenmod/trebuchet/preference/Preferences.java @@ -126,11 +126,17 @@ public class Preferences extends PreferenceActivity addPreferencesFromResource(R.xml.preferences_homescreen); PreferenceCategory general = (PreferenceCategory)findPreference("ui_homescreen_general"); - boolean workspaceTabletGrid = getResources().getBoolean(R.bool.config_workspaceTabletGrid); - if (general != null && (LauncherApplication.isScreenLarge() && workspaceTabletGrid == false)) { - Preference grid = findPreference("ui_homescreen_grid"); - if (grid != null) { - general.removePreference(grid); + if (general != null && LauncherApplication.isScreenLarge()) { + boolean workspaceTabletGrid = getResources().getBoolean(R.bool.config_workspaceTabletGrid); + if (workspaceTabletGrid == false)) + Preference grid = findPreference("ui_homescreen_grid"); + if (grid != null) { + general.removePreference(grid); + } + } + Preference stretch = findPreference("ui_homescreen_stretch_screens"); + if (stretch != null) { + general.removePreference(stretch); } } } |