diff options
author | Sunny Goyal <sunnygoyal@google.com> | 2015-09-14 21:47:02 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2015-09-14 21:47:02 +0000 |
commit | 00e827c70cb4213ee05140157006a37d12662448 (patch) | |
tree | 791e8a024420d9fc398174c0a56fc1722d4c771c /src/com/android/launcher3/DeviceProfile.java | |
parent | c0d915deae318c4c30a55e001b01619203ad677d (diff) | |
parent | 5fcaab43e603ceabd1d71ec355c8a0b59aac8cf0 (diff) | |
download | android_packages_apps_Trebuchet-00e827c70cb4213ee05140157006a37d12662448.tar.gz android_packages_apps_Trebuchet-00e827c70cb4213ee05140157006a37d12662448.tar.bz2 android_packages_apps_Trebuchet-00e827c70cb4213ee05140157006a37d12662448.zip |
am 5fcaab43: am ea9ad5ce: Merge remote-tracking branch \'origin/ub-launcher3-burnaby\' into mnc-dev
* commit '5fcaab43e603ceabd1d71ec355c8a0b59aac8cf0': (76 commits)
Restoring provider behavior for reloading app on old devices > For older devices, launcher will only reload in case of inserts with specific query parameters > For older devices, launcehr will notify content observers of any internal inserts > Chaning TAG for Launcher provider as max logging tag is only 23 characters
Removing items which are on invalid screen
Preventing null pointer crash when opening a folder
Revert workaround for move to default screen on home intent.
Fixing NPE in recycler view scroll bar.
Adding workaround for regression caused by ag/752175
Adding gradle script for Android Studio
Override the overscroll color for the widget rows.
Adding graphic for all apps empty search screen.
Using GET_UNINSTALLED_PACKAGES flag when getting packageInfo for a managed profile app
Revert "Adding viewId for the QSB"
Adding viewId for the QSB
Fixing issue with missing scroll bar after fast-scrolling and searching.
Fixing an issue where you would inadvertently start fastscrolling.
Pending bind callbacks should be cleared before starting the loader, similar to startBinding
Fixing widgets container inactive scroll bar color.
Making the detached scrollbar catch up faster to the actual scroll position.
Updating theme to use the light theme by default, instead of wallpaper theme > This allows us to use all the goodness of material theme > Cursor in folder edit text is no longer 1px wide
Updating the target sdk to launcher
Using the usermanager api to get creation time
...
Diffstat (limited to 'src/com/android/launcher3/DeviceProfile.java')
-rw-r--r-- | src/com/android/launcher3/DeviceProfile.java | 20 |
1 files changed, 5 insertions, 15 deletions
diff --git a/src/com/android/launcher3/DeviceProfile.java b/src/com/android/launcher3/DeviceProfile.java index 62b05b0d6..774594fe2 100644 --- a/src/com/android/launcher3/DeviceProfile.java +++ b/src/com/android/launcher3/DeviceProfile.java @@ -56,7 +56,6 @@ public class DeviceProfile { private final int overviewModeBarItemWidthPx; private final int overviewModeBarSpacerWidthPx; private final float overviewModeIconZoneRatio; - private final float overviewModeScaleFactor; // Workspace private int desiredWorkspaceLeftRightMarginPx; @@ -136,8 +135,6 @@ public class DeviceProfile { res.getDimensionPixelSize(R.dimen.dynamic_grid_overview_bar_spacer_width); overviewModeIconZoneRatio = res.getInteger(R.integer.config_dynamic_grid_overview_icon_zone_percentage) / 100f; - overviewModeScaleFactor = - res.getInteger(R.integer.config_dynamic_grid_overview_scale_percentage) / 100f; iconDrawablePaddingOriginalPx = res.getDimensionPixelSize(R.dimen.dynamic_grid_icon_drawable_padding); @@ -334,18 +331,11 @@ public class DeviceProfile { } } - Rect getOverviewModeButtonBarRect() { + int getOverviewModeButtonBarHeight() { int zoneHeight = (int) (overviewModeIconZoneRatio * availableHeightPx); zoneHeight = Math.min(overviewModeMaxIconZoneHeightPx, Math.max(overviewModeMinIconZoneHeightPx, zoneHeight)); - return new Rect(0, availableHeightPx - zoneHeight, 0, availableHeightPx); - } - - public float getOverviewModeScale(boolean isLayoutRtl) { - Rect workspacePadding = getWorkspacePadding(isLayoutRtl); - Rect overviewBar = getOverviewModeButtonBarRect(); - int pageSpace = availableHeightPx - workspacePadding.top - workspacePadding.bottom; - return (overviewModeScaleFactor * (pageSpace - overviewBar.height())) / pageSpace; + return zoneHeight; } // The rect returned will be extended to below the system ui that covers the workspace @@ -394,7 +384,7 @@ public class DeviceProfile { final boolean isLayoutRtl = Utilities.isRtl(launcher.getResources()); // Layout the search bar space - View searchBar = launcher.getSearchBar(); + View searchBar = launcher.getSearchDropTargetBar(); lp = (FrameLayout.LayoutParams) searchBar.getLayoutParams(); if (hasVerticalBarLayout) { // Vertical search bar space -- The search bar is fixed in the layout to be on the left @@ -476,7 +466,7 @@ public class DeviceProfile { // Layout the Overview Mode ViewGroup overviewMode = launcher.getOverviewPanel(); if (overviewMode != null) { - Rect r = getOverviewModeButtonBarRect(); + int overviewButtonBarHeight = getOverviewModeButtonBarHeight(); lp = (FrameLayout.LayoutParams) overviewMode.getLayoutParams(); lp.gravity = Gravity.CENTER_HORIZONTAL | Gravity.BOTTOM; @@ -485,7 +475,7 @@ public class DeviceProfile { int maxWidth = totalItemWidth + (visibleChildCount-1) * overviewModeBarSpacerWidthPx; lp.width = Math.min(availableWidthPx, maxWidth); - lp.height = r.height(); + lp.height = overviewButtonBarHeight; overviewMode.setLayoutParams(lp); if (lp.width > totalItemWidth && visibleChildCount > 1) { |