I'm working with a phone with a high-resolution screen.

For layouts, I have declared a font size as follows:
        <dimen   name="assetDetails_Section_FontSz">12sp</dimen>

For a first TextView, I apply this in the XML layout file as follows:
                        <TextView
                                android:id="@+id/AstDtl_Synop"
                                
android:textSize="@dimen/assetDetails_Section_FontSz"
                                android:maxLines="8" />

For a second TextView, on the same screen, I apply it
programmatically:
                        TextView name = new TextView(this);
        
name.setTextSize(mApp.gResources.getDimension(R.dimen.assetDetails_Section_FontSz));

When these TextViews are displayed, the font in the first TextView is
smaller than the font in the second TextView.  I was expecting them to
be the same.

Checking the return from getDimension(), it's coming back as 18
suggesting that it has been scaled to the screen.

What am I missing?

Thanks!

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to