The units in those Java methods are pixels, just like almost everything else at runtime (drawing, layout).
You can use TypedValue.complexToDimension and friends to convert from dp to pixels if needed: http://developer.android.com/reference/android/util/TypedValue.html#complexToDimension(int, android.util.DisplayMetrics) Specifying your image in pixels (you wrote: 38px) is a sure way to make it look wrong on everything but one display class (size / density), which is what you are seeing. Use dp units and convert, or just place more images under res/drawable-hdpi and/or -ldpi, etc. You can find the platform default values for bounds in your sdk directory under platforms/platform-X/data/res/values. They use dp units, too. -- Kostya 19 декабря 2011 г. 21:34 пользователь dashman <[email protected]> написал: > > i'm using setIndicatorBounds() and need some help in a screen rez. > independent solution. > > for the group layout i've got: > > 5 dip padding | image 38px | <indicator-here | rest of layout... > > > not sure what the units for setIndicatorBounds() are. i can make > it look fine in one screen rez, but doesn't look good > in another. > > -- > 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 -- 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

