I'd like to implement several layouts: one for phone, another - tablet. This means I need to create a few folders: layout-normal, layout-large. Next, in order to test mechanism I need to somehow force avd to launch machine with specific width and height parameters (inches ?) - how is it done ?
Asked
Active
Viewed 600 times
0
-
you can create different emulators for different devices – thepoosh May 02 '12 at 09:31
-
yeah, but I'm a bit confused about it. What is the measure for width/height parameter ? I don't see anything regarding "size" in the manager - could you explain ? – May 02 '12 at 09:35
-
1refer this [May it helpful for you][1] [1]: http://stackoverflow.com/questions/9678970/which-layout-is-suitable-for-all-android-mobile – Sandip Armal Patil May 02 '12 at 09:44
2 Answers
0
You can configure the machines display height / width / dpi when you create a virtual device in AVD Manager.

Arnab Chakraborty
- 7,442
- 9
- 46
- 69
-
great, I must be missing something. Same size can have different resolutions - right? – May 02 '12 at 09:36
-
1Since the display is measured in pixels, size is irrelevant. And yes, different sizes may have same resolutions. – Arnab Chakraborty May 02 '12 at 09:38
-
Why? My guess is that, in theory, there can be a device with small physical size and high resolution and vise versa. So in case of small physical size, high resolution I'm supposed to give user a phone layout, not a tablet one disregarding resolution values. Similarly in case of big tablet with low resolution I should still present tablet-oriented layout. So, why should I judge by resolution ? – May 02 '12 at 09:43
-
imho, I dont think you'd have much luck finding the screen size. You could look into koneX's answer, he has provided a very good link, which you must go through if you are intending to target multiple sized screens. I personally had found it extremely helpful. – Arnab Chakraborty May 02 '12 at 09:49
0
This might help: Supporting multiple screens.
Edit: Check this too, for setting a layout-large AVD
-
I've been struggling through it for the last couple of hours, yet it's not clear what is the measure for physical height in terms of Android. Is it inch ? Or like Aki says - dp ? – May 02 '12 at 09:46
-
1Check out 'Table 3' in that link. When you are creating an AVD set the resolution in function of what you need (QVGA works for layout-small, HVGA works for layout-medium, etc) – andoni90 May 02 '12 at 09:53
-
Well, it seems to be something I've been searching for. I'll study attentively and ask/accept a bit later. Thanks. – May 02 '12 at 10:06
-
*Sighs* So, the measure for height/width is inch or dp ? Still puzzled about creating a custom device. Isn't it about specifying physical inches(size) and amount of device pixels(resolution) ? – May 02 '12 at 10:54