Moto Droid Ignoring Font Size


Last Updated:

  1. Blrfl

    Blrfl Well-Known Member This Topic's Starter

    Joined:
    Jan 7, 2010
    Messages:
    108
    Likes Received:
    20
    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 (Text):
    1. <!-- dimen.xml -->
    2. <dimen name="entry_size">12pt</dimen>
    3. ...
    ...and this in the layout...

    Code (Text):
    1. <!-- File containing layout -->
    2.     <TextView
    3.         android:id="@+id/xxx"
    4.         android:layout_width="fill_parent"
    5.         android:layout_height="fill_parent"
    6.         android:gravity="center"
    7.         android:textSize="@dimen/entry_size"
    8.         android:typeface="monospace"            
    9.     />
    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
     

    Advertisement
  2. dmitriyk

    dmitriyk Active Member

    Joined:
    Apr 17, 2010
    Messages:
    44
    Likes Received:
    10
    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."
     
  3. Blrfl

    Blrfl Well-Known Member This Topic's Starter

    Joined:
    Jan 7, 2010
    Messages:
    108
    Likes Received:
    20
    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
     
  4. dmitriyk

    dmitriyk Active Member

    Joined:
    Apr 17, 2010
    Messages:
    44
    Likes Received:
    10
    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?
     

Share This Page

Loading...