summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher3/Utilities.java
diff options
context:
space:
mode:
authorSunny Goyal <sunnygoyal@google.com>2016-09-19 16:39:23 +0000
committerandroid-build-merger <android-build-merger@google.com>2016-09-19 16:39:23 +0000
commit290e9e2807adc5383757cff2689e873683faea7e (patch)
tree988281e719535a7b59c6b7f1855668b6b4e3597b /src/com/android/launcher3/Utilities.java
parent8260e0da8b05af8562388cdb525f0534ed7e4db8 (diff)
parentbaec6ffae2c260180dbdf2c6b2ca2f38e1df8f1a (diff)
downloadandroid_packages_apps_Trebuchet-290e9e2807adc5383757cff2689e873683faea7e.tar.gz
android_packages_apps_Trebuchet-290e9e2807adc5383757cff2689e873683faea7e.tar.bz2
android_packages_apps_Trebuchet-290e9e2807adc5383757cff2689e873683faea7e.zip
Updating the paddings in folder cell
am: baec6ffae2 Change-Id: I4bfa78ade93639d3864baeeb5028b9caa3935c29
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 17afe051a..b4f0a498c 100644
--- a/src/com/android/launcher3/Utilities.java
+++ b/src/com/android/launcher3/Utilities.java
@@ -472,11 +472,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);
}
/**