• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Apps Moto Droid Ignoring Font Size

Blrfl

Well-Known Member
Hey all...

I have an application that's being beta tested by several people, a few of whom have Motorola Droids. The application specifies the following in one of its activities:

Code:
<!-- dimen.xml -->
<dimen name="entry_size">12pt</dimen>
...

...and this in the layout...

Code:
<!-- File containing layout -->
    <TextView
        android:id="@+id/xxx"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        android:gravity="center"
        android:textSize="@dimen/entry_size"
        android:typeface="monospace"            
    />

It works perfectly in the emulator under 1.5/1.6/2.1/2.2 and on the assorted HTC handsets where it's been tried. The Droid users, however, get a very small font, which seems to be the same default size I get on the emulator if I don't specify any size at all.

Has anyone seen this and, more importantly, been able to cure it? I'm hoping there isn't something specific to the version of Android on the Droid where I have to specify font size in some other unit, like cubic hectares. :rolleyes:

Thanks.

--Mark
 
I don't know the answer to your particular question, but you should probably be defining your font size using the "sp" unit rather than "pt."
 
Thanks for the idea. Sp doesn't work, either, and it's only Droids with the Verizon OS. I've found another thing or two that this load does differently than those on the emulator or the HTC handsets. I guess in this case, Droid Does... Differently.

In this application, I actually do want the type to be a certain size, so pt is more appropriate.

--Mark
 
Uh, the sp unit works just fine on my stock Verizon 2.1 Droid; I haven't tried pt.

Have you tried putting the dimension unit right into the XML layout file, just to see if the issue is with your reference?
 
Back
Top Bottom