mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-01 08:16:49 +00:00
Merge "Add border spacing and fixed cell height to grid." into sc-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
8dd4ddc7ae
@@ -17,6 +17,7 @@
|
||||
package com.android.launcher3;
|
||||
|
||||
import static com.android.launcher3.FastBitmapDrawable.newIcon;
|
||||
import static com.android.launcher3.config.FeatureFlags.ENABLE_FOUR_COLUMNS;
|
||||
import static com.android.launcher3.graphics.IconShape.getShape;
|
||||
import static com.android.launcher3.graphics.PreloadIconDrawable.newPendingIcon;
|
||||
import static com.android.launcher3.icons.GraphicsUtils.setColorAlphaBound;
|
||||
@@ -194,6 +195,7 @@ public class BubbleTextView extends TextView implements ItemInfoUpdateReceiver,
|
||||
setTextSize(TypedValue.COMPLEX_UNIT_PX, grid.iconTextSizePx);
|
||||
setCompoundDrawablePadding(grid.iconDrawablePaddingPx);
|
||||
defaultIconSize = grid.iconSizePx;
|
||||
setCenterVertically(ENABLE_FOUR_COLUMNS.get());
|
||||
} else if (mDisplay == DISPLAY_ALL_APPS) {
|
||||
setTextSize(TypedValue.COMPLEX_UNIT_PX, grid.allAppsIconTextSizePx);
|
||||
setCompoundDrawablePadding(grid.allAppsIconDrawablePaddingPx);
|
||||
@@ -228,7 +230,6 @@ public class BubbleTextView extends TextView implements ItemInfoUpdateReceiver,
|
||||
int shadowSize = context.getResources().getDimensionPixelSize(
|
||||
R.dimen.blur_size_click_shadow);
|
||||
mHighlightShadowFilter = new BlurMaskFilter(shadowSize, BlurMaskFilter.Blur.INNER);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -550,6 +551,14 @@ public class BubbleTextView extends TextView implements ItemInfoUpdateReceiver,
|
||||
outBounds.set(left, top, right, bottom);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Sets whether to vertically center the content.
|
||||
*/
|
||||
public void setCenterVertically(boolean centerVertically) {
|
||||
mCenterVertically = centerVertically;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
|
||||
if (mCenterVertically) {
|
||||
|
||||
Reference in New Issue
Block a user