diff options
author | Adam Cohen <adamcohen@google.com> | 2014-08-12 09:23:13 -0700 |
---|---|---|
committer | Adam Cohen <adamcohen@google.com> | 2014-08-13 21:39:48 +0000 |
commit | 63f1ec00fbbd109130d1e476371dbc9a87bb544d (patch) | |
tree | 3ce4a58917723ada9e838629e5660fe0758b83e7 /src/com/android/launcher3/DeviceProfile.java | |
parent | 0fc1be164e982433e619bcbb16aa67e28ff681ef (diff) | |
download | android_packages_apps_Trebuchet-63f1ec00fbbd109130d1e476371dbc9a87bb544d.tar.gz android_packages_apps_Trebuchet-63f1ec00fbbd109130d1e476371dbc9a87bb544d.tar.bz2 android_packages_apps_Trebuchet-63f1ec00fbbd109130d1e476371dbc9a87bb544d.zip |
Further refinement of all apps / widgets transition
Change-Id: Id107a9aff74f014c07f8cbea6e74951a02dbddab
Diffstat (limited to 'src/com/android/launcher3/DeviceProfile.java')
-rw-r--r-- | src/com/android/launcher3/DeviceProfile.java | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/com/android/launcher3/DeviceProfile.java b/src/com/android/launcher3/DeviceProfile.java index 018fcfcbc..8af2a7fbb 100644 --- a/src/com/android/launcher3/DeviceProfile.java +++ b/src/com/android/launcher3/DeviceProfile.java @@ -126,6 +126,7 @@ public class DeviceProfile { int searchBarSpaceHeightPx; int searchBarHeightPx; int pageIndicatorHeightPx; + int allAppsButtonVisualSize; float dragViewScale; @@ -242,6 +243,18 @@ public class DeviceProfile { // Calculate the remaining vars updateFromConfiguration(context, res, wPx, hPx, awPx, ahPx); updateAvailableDimensions(context); + computeAllAppsButtonSize(context); + } + + /** + * Determine the exact visual footprint of the all apps button, taking into account scaling + * and internal padding of the drawable. + */ + private void computeAllAppsButtonSize(Context context) { + Resources res = context.getResources(); + float padding = res.getInteger(R.integer.config_allAppsButtonPaddingPercent) / 100f; + LauncherAppState app = LauncherAppState.getInstance(); + allAppsButtonVisualSize = (int) (hotseatIconSizePx * (1 - padding)); } void addCallback(DeviceProfileCallbacks cb) { |