OK. Having a day or so to think about this, I think I asked the wrong question.
So, let me try again: Is there way to do font scaling similar to the way you can assign percentages to a layout? I realized that with my existing portrait mdpi layout, I was inadvertently relying on the height of some of my text to affect the placement of Views that came below the text. This looks great on a myTouch, but crappy on a Galaxy Tab 10.1 since there are so many remaining vertical pixels (even with the font scaling using dp units.) Regards, - Mike On May 23, 4:46 pm, Dianne Hackborn <[email protected]> wrote: > The font size should be the same on those two devices (myTouch and Galaxy > Tab 10.1) because they have the same density. What is bringing you to think > they should be different? > > On Mon, May 23, 2011 at 3:34 PM, Mike <[email protected]>wrote: > > > > > > > > > > > Hi Dianne, > > > Thanks for the quick reply. > > > I understand density to be a function of native resolution versus > > physical display size. So, the new Galaxy Tab 10.1 which has a native > > resolution of 800 x 1280 pixels and a physical display size of 10.1" > > diagonal ends up being a mdpi device. When I populate a > > DisplayMetrics for the Galaxy Tab 10.1, it gives me a density of 1.0 > > and a density dpi of DENSITY_MEDIUM which confirms this. > > > I misspoke with regard to the Evo. I apologize. It is indeed an hdpi > > device. > > > In any case, I believe I still need to address this issue since a > > device such as the myTouch (320x480 native resolution) is an mdpi > > device as well. Even though the myTouch and Galaxy Tab 10.1 have > > drastically different native resolutions as you point out. I've been > > having difficulty using device independent units for my text size to > > make the font look appropriate on both devices since they map to the > > same layout file. > > > - Mike > > > On May 23, 4:16 pm, Dianne Hackborn <[email protected]> wrote: > > > Evo and Galaxy Tab are both hdpi (though the Tab technically should > > probably > > > be mdpi... hdpi is okay though, it is just a design decision for the > > device > > > to make the overall UI larger). > > > > Also density != "higher res". It is REALLY REALLY important to > > understand > > > this. The Xoom is mdpi but much higher resolution than the hdpi phones. > > It > > > just has a bigger screen, but as a result is lower density. > > > > If all you care about is the screen resolution (that is you don't care > > > really about having your UI size remain about the same across devices), > > then > > > don't use density which will pick resources based on *screen density* not > > > resolution. You could instead use -nodpi and just do your own resource > > > selection based on how many pixels you have to use. > > > > On Mon, May 23, 2011 at 2:35 PM, Mike <[email protected] > > >wrote: > > > > > I've started work to get my games to scale nicely for the higher-res > > > > displays like the Xoom and Galaxy Tab devices. > > > > > I've made use of the ldpi/mdpi/hdpi/xhdpi folder naming convention for > > > > my resources which works nicely for layouts and graphics, but not so > > > > much for text size scaling. The problem is that an Evo and a Galaxy > > > > Tab 10.1 are both mdpi devices and will map to the same layout file. > > > > Yet, I need to scale the text size differently for these two devices. > > > > (I'm using text size units of dp.) > > > > > Any ideas on something obvious I might be missing or any suggestions > > > > would be much appreciated. > > > > > - Mike > > > > > -- > > > > 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 > > > > -- > > > Dianne Hackborn > > > Android framework engineer > > > [email protected] > > > > Note: please don't send private questions to me, as I don't have time to > > > provide private support, and so won't reply to such e-mails. All such > > > questions should be posted on public forums, where I and others can see > > and > > > answer them. > > > -- > > 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 > > -- > Dianne Hackborn > Android framework engineer > [email protected] > > Note: please don't send private questions to me, as I don't have time to > provide private support, and so won't reply to such e-mails. All such > questions should be posted on public forums, where I and others can see and > answer them. -- 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

