I've spent a good bit of today making a couple of my apps scale well to tablet size, so I'll chime in here.
My experience currently is the following: - If your activity could benefit from a completely different layout for tablets (>5" screen), then do so, in a res/layout-large directory. Otherwise, make your existing layouts scale: - Use layout classes (like RelativeLayout and LinearLayout) which scale naturally. - Use 9-patch drawables liberally. It may be helpful to re-use your existing hdpi drawables for large configurations. - Use <dimen> resources in res/values-large to specifically target dimensions (like font sizes & margins) to tablets. I actually enjoyed the process, once I got into it... Creating emulator instances for the Dell Streak and Galaxy Tab, then making my apps look good on them one, was quite satisfying. String On Sep 14, 8:18 pm, niko20 <[email protected]> wrote: > I guess my problem is that if you look at the graph on > > http://developer.android.com/guide/practices/screens_support.html > > It only shows "large" as the 480-800 pixel medium density, and 480x854 > pixel medium density. > > So what I'm saying is it's still only considered "480x854" for > example. So if you designed a layout to look good and you made buttons > that were "70dip", then even on a larger pixel screen the buttons are > still 70dip ...so you end up with a big empty space. > > I guess maybe to answer my own question, you would probably have to > set buttons to use relative layout commands instead of any specific > "size" such as dips or mm. So you would set the main parent to fill > the screen (fill_parent) and come up with your layout based on all > relative from that? > > Thanks for the input! > > -niko > > On Sep 14, 1:44 pm, Dianne Hackborn <[email protected]> wrote: > > > > > DroidX is a normal screen, larger screens like the 7" samsung are large. > > You can provide a different layout for large if that is what works for you. > > > On Tue, Sep 14, 2010 at 11:27 AM, niko20 <[email protected]> wrote: > > > I've been studying the screen support of Android and yes, while it IS > > > flexible, I still don't see how you can support a "really large" > > > screen like the Samsung tablet is going to have. I think no matter > > > what you end up with lots of wasted real estate. > > > > The problem is the Android doesn't automatically "scale up" your app > > > if you run in compatibility mode - rather, it fits it into a postage > > > stamp instead. > > > > Because of this, how can you really make an app that will "never" have > > > some postage stamping at all, unless you use all 9patch drawables and > > > Absolute Layouts? (Well, you could draw the GUI yourself, which is > > > what my Reloop Sequencer does) > > > > As an example, my drum machine app, Electrum Drum, has a certain > > > layout for the buttons and pads. Now, on a larger screen, it would be > > > nice to just make all the buttons and pads BIGGER. I need the same > > > layout relationships between all the elements though. Basically I just > > > want a "scaled" up version of the UI. Maybe I can achieve this with > > > 9patch drawables and relative layouts? > > > > The issue is I could certainly make "large" graphical elements (if not > > > use a 9patch drawable) but there is no way for something, for example, > > > to know that hey, I have LOTS of space I can use. Let's say for > > > example, that you want a completely different layout on a tablet - say > > > you want more buttons, etc, on your layout now. You can't do it > > > because there is no way for the android app to "know" that this > > > "large" screen is actually larger than "large". A Droid X probably > > > reports itself as large, although the screen is only 4.x inches or so, > > > where you would not have room for those extra buttons. This is no > > > where near as large as 7" or 10", even at a pixel density of 170 or > > > 240. > > > > I think the default behavoir would have been better to scale up images > > > in compatibility mode, and if the dev could provide higher res images > > > then it would use them of course (put them in the large high dpi > > > folders), but I don't see how a layout itself can scale correctly in > > > really large cases like a tablet. > > > > We need some better explanation of how to handle these cases. While > > > the blog and the dev site touch on much of it, I still don't > > > understand how a normal app is going to be enabled to scale up easily. > > > It would have been easy if Android would have just "magnified" the > > > view, but it doesn't. > > > > -niko > > > > -- > > > 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]<android-developers%2Bunsubs > > > [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

