Issue
It's 7' inch tablet.
DisplayMetric
says:
DisplayMetrics
{density=1.0, width=480, height=752, scaledDensity=1.0, xdpi=160.0, ydpi=160.42105}
but the chosen resource folder for attrs.xml and styles.xml is
values-normal
but it should be:
large-normal
Is it correct or is it a bad configuration from the manifacturer?
Solution
As you can see, it is:
scaledDensity=1.0, xdpi=160.0, ydpi=160.42105
160 dpi corresponds to mdpi, not hdpi (240 dpi).
and mdpi is considered normal (so, the scale is 1.0).
But this is a TABLET.
I think it's time to use that damn
values-sw600dp
folder.
From the reference site:
Declaring Tablet Layouts for Android 3.2
For the first generation of tablets running Android 3.0, the proper way to declare tablet layouts was to put them in a directory with the xlarge configuration qualifier (for example, res/layout-xlarge/). In order to accommodate other types of tablets and screen sizes—in particular, 7" tablets—Android 3.2 introduces a new way to specify resources for more discrete screen sizes. The new technique is based on the amount of space your layout needs (such as 600dp of width), rather than trying to make your layout fit the generalized size groups (such as large or xlarge).
The reason designing for 7" tablets is tricky when using the generalized size groups is that a 7" tablet is technically in the same group as a 5" handset (the large group). While these two devices are seemingly close to each other in size, the amount of space for an application's UI is significantly different, as is the style of user interaction. Thus, a 7" and 5" screen should not always use the same layout. To make it possible for you to provide different layouts for these two kinds of screens, Android now allows you to specify your layout resources based on the width and/or height that's actually available for your application's layout, specified in dp units.
For example, after you've designed the layout you want to use for tablet-style devices, you might determine that the layout stops working well when the screen is less than 600dp wide. This threshold thus becomes the minimum size that you require for your tablet layout. As such, you can now specify that these layout resources should be used only when there is at least 600dp of width available for your application's UI.
You should either pick a width and design to it as your minimum size, or test what is the smallest width your layout supports once it's complete.
Answered By - Phantômaxx
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.