[android-developers] Supporting multiple screens
Hi, My application will have two layouts, one for large screens and one for normal. For testing I'm working with one phone (800x480 240dpi) and one tablet (1024x600 240dpi) but both are detected as large screen hdpi and long aspect ratio, so I'm not able to assign different layouts. The only approach I think that can work is to create layout-large and layout-normal, get the resolution and programmatically set the layout folder. Is that possible? -- 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
Re: [android-developers] Supporting multiple screens
On Thu, Aug 19, 2010 at 2:00 AM, Albert alberto.cresp...@gmail.com wrote: My application will have two layouts, one for large screens and one for normal. For testing I'm working with one phone (800x480 240dpi) and one tablet (1024x600 240dpi) but both are detected as large screen hdpi and long aspect ratio, so I'm not able to assign different layouts. The only approach I think that can work is to create layout-large and layout-normal, get the resolution and programmatically set the layout folder. Is that possible? AFAIK, you cannot programmatically set the layout folder. 1024x600 is not a supported screen resolution at this time. It seems likely that the upcoming Gingerbread release will add support for this resolution or similar ones. At that point, you should receive official instructions on how to best support such resolutions. In the meantime, use two different names for the layouts, use DisplayMetrics to figure out your screen size, and choose which layout to load by name. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy _The Busy Coder's Guide to Android Development_ Version 3.1 Available! -- 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
Re: [android-developers] Supporting multiple screens
800x...@240dpi is definitely a normal screen. If the device is reporting it as large, it is broken. On Wed, Aug 18, 2010 at 11:00 PM, Albert alberto.cresp...@gmail.com wrote: Hi, My application will have two layouts, one for large screens and one for normal. For testing I'm working with one phone (800x480 240dpi) and one tablet (1024x600 240dpi) but both are detected as large screen hdpi and long aspect ratio, so I'm not able to assign different layouts. The only approach I think that can work is to create layout-large and layout-normal, get the resolution and programmatically set the layout folder. Is that possible? -- 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.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Dianne Hackborn Android framework engineer hack...@android.com 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 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