diff options
Diffstat (limited to 'src/com/android/launcher3/BubbleTextView.java')
-rw-r--r-- | src/com/android/launcher3/BubbleTextView.java | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/com/android/launcher3/BubbleTextView.java b/src/com/android/launcher3/BubbleTextView.java index 659b2b9d9..c9448850e 100644 --- a/src/com/android/launcher3/BubbleTextView.java +++ b/src/com/android/launcher3/BubbleTextView.java @@ -20,7 +20,6 @@ import android.content.Context; import android.content.res.Resources; import android.graphics.Bitmap; import android.graphics.Canvas; -import android.graphics.Color; import android.graphics.Rect; import android.graphics.Region; import android.graphics.Region.Op; @@ -87,7 +86,7 @@ public class BubbleTextView extends TextView { // Ensure we are using the right text size LauncherAppState app = LauncherAppState.getInstance(); DeviceProfile grid = app.getDynamicGrid().getDeviceProfile(); - setTextSize(TypedValue.COMPLEX_UNIT_SP, grid.iconTextSize); + setTextSize(TypedValue.COMPLEX_UNIT_PX, grid.iconTextSizePx); setTextColor(getResources().getColor(R.color.workspace_icon_text_color)); } @@ -111,7 +110,7 @@ public class BubbleTextView extends TextView { Bitmap b = info.getIcon(iconCache); setCompoundDrawables(null, Utilities.createIconDrawable(b), null, null); - setCompoundDrawablePadding((int) ((grid.folderIconSizePx - grid.iconSizePx) / 2f)); + setCompoundDrawablePadding(grid.iconDrawablePaddingPx); setText(info.title); setTag(info); } @@ -203,6 +202,10 @@ public class BubbleTextView extends TextView { destCanvas.restore(); } + public void setGlowColor(int color) { + mFocusedOutlineColor = mFocusedGlowColor = mPressedOutlineColor = mPressedGlowColor = color; + } + /** * Returns a new bitmap to be used as the object outline, e.g. to visualize the drop location. * Responsibility for the bitmap is transferred to the caller. |