On Wed, Oct 6, 2010 at 12:55 PM, Dmaxi <[email protected]> wrote: > Samsung Galaxy Tab reports large screen, hdpi(240 dpi) density and 1.5 > density scale. According to the resolution (1024x600) and LCD size > (7") the real density is 170 dpi. > > The only problem with this is the following. > The developer creates a layout for large screens and assumes the width > of the screen can be at least 800, so sets a UI component width to > 750dip. It is density independent pixel so it should be fine for the > 1024 pixel width of Samsung Galaxy Tab LCD but actually it is not. > Android auto scales the component's size and multiplies it by 1.5. The > result is the edges of the component are not visible on the screen. > > Is there any solution for this problem?
Don't set the UI component width to 750dip. The fewer hardcoded dimensions (or even dimension resources) you use, the better, especially for height and width. Particularly for something that large, I would aim for having the stuff around it be wrap_content and giving that widget all available space. Or, use LinearLayout to implement a percentage-based model. Anything that does not involve actual pixels, or even dip, if at all possible. Besides, the assumption that large screens will have a width of at least 800px is just that -- an assumption. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy _Android Programming Tutorials_ Version 3.0.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 [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

