OSDN Git Service

Fix text size in Fake Action Bar. [DO NOT MERGE]
authorDeepanshu Gupta <deepanshu@google.com>
Fri, 8 Nov 2013 11:13:07 +0000 (16:43 +0530)
committerDeepanshu Gupta <deepanshu@google.com>
Tue, 6 May 2014 21:02:44 +0000 (14:02 -0700)
The density multiplier was being applied twice to the title text in
the fake action bar.

Bug: 11436018
Change-Id: Id74c11037cb43d01f6cd79126623c84edfc37aaf
(cherry-picked from 083d1562e00631630b5594462ce4a867a3508d8d)

tools/layoutlib/bridge/src/com/android/layoutlib/bridge/bars/CustomBar.java

index ec9ec75..11fd697 100644 (file)
@@ -274,7 +274,7 @@ public abstract class CustomBar extends LinearLayout {
                     TypedValue out = new TypedValue();
                     if (ResourceHelper.parseFloatAttribute("textSize", textSize.getValue(), out,
                             true /*requireUnit*/)) {
-                        textView.setTextSize(
+                        textView.setTextSize(TypedValue.COMPLEX_UNIT_PX,
                                 out.getDimension(bridgeContext.getResources().getDisplayMetrics()));
                     }
                 }