diff options
author | Winson Chung <winsonc@google.com> | 2015-06-01 14:38:24 -0700 |
---|---|---|
committer | Winson Chung <winsonc@google.com> | 2015-06-05 09:49:12 -0700 |
commit | 2c6e5ccbcd7c3f87e7e85029782440600dc0a3d8 (patch) | |
tree | f181fbee9f46ddf18adc42a4d9c823ccd2f1b5fe /src/com/android/launcher3/allapps/AllAppsGridAdapter.java | |
parent | a56eab41fbfe26b185cc8240d50d231d0db41837 (diff) | |
download | android_packages_apps_Trebuchet-2c6e5ccbcd7c3f87e7e85029782440600dc0a3d8.tar.gz android_packages_apps_Trebuchet-2c6e5ccbcd7c3f87e7e85029782440600dc0a3d8.tar.bz2 android_packages_apps_Trebuchet-2c6e5ccbcd7c3f87e7e85029782440600dc0a3d8.zip |
Ensuring that we use the screen width more optimally in AllApps.
- Fixing issue with prediction bar height being calculated incorrectly
- Fixing issue where the prediction bar divider was not drawn exactly
between the bar and the first row of apps
- Removing padding to allow scrollbars to reach full height
Bug: 20222023
Bug: 21335377
Change-Id: I2c0614a36e2294d0d6184a6bff4847876ffe971e
Diffstat (limited to 'src/com/android/launcher3/allapps/AllAppsGridAdapter.java')
-rw-r--r-- | src/com/android/launcher3/allapps/AllAppsGridAdapter.java | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/com/android/launcher3/allapps/AllAppsGridAdapter.java b/src/com/android/launcher3/allapps/AllAppsGridAdapter.java index 307d9403d..102e7ae8d 100644 --- a/src/com/android/launcher3/allapps/AllAppsGridAdapter.java +++ b/src/com/android/launcher3/allapps/AllAppsGridAdapter.java @@ -139,7 +139,7 @@ class AllAppsGridAdapter extends RecyclerView.Adapter<AllAppsGridAdapter.ViewHol if (shouldDrawItemDivider(holder, items) && !hasDrawnPredictedAppsDivider) { // Draw the divider under the predicted apps - int top = child.getTop() + child.getHeight(); + int top = child.getTop() + child.getHeight() - mPredictionBarBottomPadding / 2; c.drawLine(mBackgroundPadding.left, top, parent.getWidth() - mBackgroundPadding.right, top, mPredictedAppsDividerPaint); @@ -294,6 +294,7 @@ class AllAppsGridAdapter extends RecyclerView.Adapter<AllAppsGridAdapter.ViewHol private View.OnLongClickListener mIconLongClickListener; @Thunk final Rect mBackgroundPadding = new Rect(); @Thunk int mPredictionBarHeight; + @Thunk int mPredictionBarBottomPadding; @Thunk int mAppsPerRow; @Thunk boolean mIsRtl; private String mEmptySearchText; @@ -336,6 +337,8 @@ class AllAppsGridAdapter extends RecyclerView.Adapter<AllAppsGridAdapter.ViewHol mPredictedAppsDividerPaint.setStrokeWidth(Utilities.pxFromDp(1f, res.getDisplayMetrics())); mPredictedAppsDividerPaint.setColor(0x1E000000); mPredictedAppsDividerPaint.setAntiAlias(true); + mPredictionBarBottomPadding = + res.getDimensionPixelSize(R.dimen.all_apps_prediction_bar_bottom_padding); } /** |