mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-01 08:16:49 +00:00
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
This commit is contained in:
@@ -20,6 +20,7 @@ import android.annotation.TargetApi;
|
||||
import android.content.ComponentName;
|
||||
import android.content.Context;
|
||||
import android.content.res.Resources;
|
||||
import android.graphics.Paint;
|
||||
import android.graphics.Point;
|
||||
import android.graphics.Rect;
|
||||
import android.graphics.drawable.Drawable;
|
||||
@@ -239,11 +240,11 @@ public class AllAppsContainerView extends BaseContainerView implements DragSourc
|
||||
mLauncher = (Launcher) context;
|
||||
DeviceProfile grid = mLauncher.getDeviceProfile();
|
||||
|
||||
mContainerInset = context.getResources().getDimensionPixelSize(
|
||||
R.dimen.all_apps_container_inset);
|
||||
mPredictionBarHeight = grid.allAppsIconSizePx + grid.iconDrawablePaddingOriginalPx +
|
||||
grid.allAppsIconTextSizePx +
|
||||
2 * res.getDimensionPixelSize(R.dimen.all_apps_prediction_icon_top_bottom_padding);
|
||||
mContainerInset = res.getDimensionPixelSize(R.dimen.all_apps_container_inset);
|
||||
mPredictionBarHeight = (int) (grid.allAppsIconSizePx + grid.iconDrawablePaddingOriginalPx +
|
||||
Utilities.calculateTextHeight(grid.allAppsIconTextSizePx) +
|
||||
2 * res.getDimensionPixelSize(R.dimen.all_apps_icon_top_bottom_padding) +
|
||||
res.getDimensionPixelSize(R.dimen.all_apps_prediction_bar_bottom_padding));
|
||||
|
||||
mLayoutInflater = LayoutInflater.from(context);
|
||||
|
||||
@@ -497,11 +498,11 @@ public class AllAppsContainerView extends BaseContainerView implements DragSourc
|
||||
int startMargin = grid.isPhone ? mContentMarginStart : 0;
|
||||
int inset = mFixedBounds.isEmpty() ? mContainerInset : mFixedBoundsContainerInset;
|
||||
if (isRtl) {
|
||||
mAppsRecyclerView.setPadding(inset + mAppsRecyclerView.getScrollbarWidth(), inset,
|
||||
inset + startMargin, inset);
|
||||
mAppsRecyclerView.setPadding(inset + mAppsRecyclerView.getScrollbarWidth(), 0,
|
||||
inset + startMargin, 0);
|
||||
} else {
|
||||
mAppsRecyclerView.setPadding(inset + startMargin, inset,
|
||||
inset + mAppsRecyclerView.getScrollbarWidth(), inset);
|
||||
mAppsRecyclerView.setPadding(inset + startMargin, 0,
|
||||
inset + mAppsRecyclerView.getScrollbarWidth(), 0);
|
||||
}
|
||||
|
||||
// Update the header bar
|
||||
|
||||
Reference in New Issue
Block a user