Loading src/com/android/launcher3/BubbleTextView.java +2 −1 Original line number Diff line number Diff line Loading @@ -89,6 +89,7 @@ import com.android.launcher3.icons.PlaceHolderIconDrawable; import com.android.launcher3.icons.cache.HandlerRunnable; import com.android.launcher3.logging.FileLog; import com.android.launcher3.model.data.AppInfo; import com.android.launcher3.model.data.FolderInfo; import com.android.launcher3.model.data.ItemInfo; import com.android.launcher3.model.data.ItemInfoWithIcon; import com.android.launcher3.model.data.WorkspaceItemInfo; Loading Loading @@ -809,7 +810,7 @@ public class BubbleTextView extends TextView implements ItemInfoUpdateReceiver, @Override protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) { if (mCenterVertically) { if (mCenterVertically && (getTag() != null && !(getTag() instanceof FolderInfo))) { Paint.FontMetrics fm = getPaint().getFontMetrics(); int cellHeightPx = mIconSize + getCompoundDrawablePadding() + (int) Math.ceil(fm.bottom - fm.top); Loading src/com/android/launcher3/folder/FolderIcon.java +14 −0 Original line number Diff line number Diff line Loading @@ -27,6 +27,7 @@ import android.animation.AnimatorListenerAdapter; import android.animation.ObjectAnimator; import android.content.Context; import android.graphics.Canvas; import android.graphics.Paint; import android.graphics.Rect; import android.graphics.drawable.Drawable; import android.util.AttributeSet; Loading Loading @@ -633,6 +634,19 @@ public class FolderIcon extends FrameLayout implements FolderListener, IconLabel drawDot(canvas); } @Override protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) { if (MultiModeController.isSingleLayerMode()) { Paint.FontMetrics fm = mFolderName.getPaint().getFontMetrics(); int cellHeightPx = mFolderName.getIconSize() + mFolderName.getCompoundDrawablePadding() + (int) Math.ceil(fm.bottom - fm.top); int height = MeasureSpec.getSize(heightMeasureSpec); setPadding(getPaddingLeft(), (height - cellHeightPx) / 2, getPaddingRight(), getPaddingBottom()); } super.onMeasure(widthMeasureSpec, heightMeasureSpec); } public void drawDot(Canvas canvas) { if (!mForceHideDot && ((mDotInfo != null && mDotInfo.hasDot()) || mDotScale > 0)) { Rect iconBounds = mDotParams.iconBounds; Loading Loading
src/com/android/launcher3/BubbleTextView.java +2 −1 Original line number Diff line number Diff line Loading @@ -89,6 +89,7 @@ import com.android.launcher3.icons.PlaceHolderIconDrawable; import com.android.launcher3.icons.cache.HandlerRunnable; import com.android.launcher3.logging.FileLog; import com.android.launcher3.model.data.AppInfo; import com.android.launcher3.model.data.FolderInfo; import com.android.launcher3.model.data.ItemInfo; import com.android.launcher3.model.data.ItemInfoWithIcon; import com.android.launcher3.model.data.WorkspaceItemInfo; Loading Loading @@ -809,7 +810,7 @@ public class BubbleTextView extends TextView implements ItemInfoUpdateReceiver, @Override protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) { if (mCenterVertically) { if (mCenterVertically && (getTag() != null && !(getTag() instanceof FolderInfo))) { Paint.FontMetrics fm = getPaint().getFontMetrics(); int cellHeightPx = mIconSize + getCompoundDrawablePadding() + (int) Math.ceil(fm.bottom - fm.top); Loading
src/com/android/launcher3/folder/FolderIcon.java +14 −0 Original line number Diff line number Diff line Loading @@ -27,6 +27,7 @@ import android.animation.AnimatorListenerAdapter; import android.animation.ObjectAnimator; import android.content.Context; import android.graphics.Canvas; import android.graphics.Paint; import android.graphics.Rect; import android.graphics.drawable.Drawable; import android.util.AttributeSet; Loading Loading @@ -633,6 +634,19 @@ public class FolderIcon extends FrameLayout implements FolderListener, IconLabel drawDot(canvas); } @Override protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) { if (MultiModeController.isSingleLayerMode()) { Paint.FontMetrics fm = mFolderName.getPaint().getFontMetrics(); int cellHeightPx = mFolderName.getIconSize() + mFolderName.getCompoundDrawablePadding() + (int) Math.ceil(fm.bottom - fm.top); int height = MeasureSpec.getSize(heightMeasureSpec); setPadding(getPaddingLeft(), (height - cellHeightPx) / 2, getPaddingRight(), getPaddingBottom()); } super.onMeasure(widthMeasureSpec, heightMeasureSpec); } public void drawDot(Canvas canvas) { if (!mForceHideDot && ((mDotInfo != null && mDotInfo.hasDot()) || mDotScale > 0)) { Rect iconBounds = mDotParams.iconBounds; Loading