summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher3/Utilities.java
diff options
context:
space:
mode:
authorSunny Goyal <sunnygoyal@google.com>2016-09-14 11:26:21 -0700
committerSunny Goyal <sunnygoyal@google.com>2016-09-16 12:05:02 -0700
commitbaec6ffae2c260180dbdf2c6b2ca2f38e1df8f1a (patch)
tree1f7308d88cdb308df0452b241dfe27927d5c767d /src/com/android/launcher3/Utilities.java
parentf595f3de0fb166f5b4d43f885b63dccaaa9efd5b (diff)
downloadandroid_packages_apps_Trebuchet-baec6ffae2c260180dbdf2c6b2ca2f38e1df8f1a.tar.gz
android_packages_apps_Trebuchet-baec6ffae2c260180dbdf2c6b2ca2f38e1df8f1a.tar.bz2
android_packages_apps_Trebuchet-baec6ffae2c260180dbdf2c6b2ca2f38e1df8f1a.zip
Updating the paddings in folder cell
> Updating overall padding for the cell and adding drawable padding > Ensuring that the folder cell is always rendered properly based on available vertical space Bug: 30605958 Change-Id: I8ceb9fea5a25052b0d7461f52edca0e6a33fa085
Diffstat (limited to 'src/com/android/launcher3/Utilities.java')
-rw-r--r--src/com/android/launcher3/Utilities.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/com/android/launcher3/Utilities.java b/src/com/android/launcher3/Utilities.java
index e34f509da..b0e096a2e 100644
--- a/src/com/android/launcher3/Utilities.java
+++ b/src/com/android/launcher3/Utilities.java
@@ -686,11 +686,11 @@ public final class Utilities {
/**
* Calculates the height of a given string at a specific text size.
*/
- public static float calculateTextHeight(float textSizePx) {
+ public static int calculateTextHeight(float textSizePx) {
Paint p = new Paint();
p.setTextSize(textSizePx);
Paint.FontMetrics fm = p.getFontMetrics();
- return -fm.top + fm.bottom;
+ return (int) Math.ceil(fm.bottom - fm.top);
}
/**