The return value is in pixels, converted from whatever value in the <dimen... > resource based on current display metrics.

There are three versions of getDimension, differing in rounding rules.

http://developer.android.com/reference/android/content/res/Resources.html#getDimension(int) <http://developer.android.com/reference/android/content/res/Resources.html#getDimension%28int%29>

-- K

17.03.2012 21:23, David Karr ?????:

In Java code, however, it appears that you reference a dimension resource like this:

    float dimen =
    activity.getResources().getDimension(R.dimen.mysize_in_pixels);


That looks to me like it's only returning the dimensionless value ("5", for instance).

--
Kostya Vasilyev

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

Reply via email to