• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

How can i create AVD for different sizes and densities?

 
Ranch Hand
Posts: 85
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I want to change the program that the program be multi screen. I want to create a few emulator for test my program. I want to create some emulator that check table3 in this link(http://developer.android.com/guide/practices/screens_support.html#testing) but i don't know how can i create a AVD for small screen with high density?

In create new AVD window in Eclipse, in opposite "Name", i write name of emulator and in opposite "Target" i select Android 4.1 and i write 128 for SD card size but i don't know how can i select size and density?

Thanks for advises.
Cheers.
 
Bartender
Posts: 4179
22
IntelliJ IDE Python Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You will have to create a new device. On the AVD Manager, switch to the Device Definitions tab and press New Device (or start by selecting one of the devices which is close to what you want and pressing Clone). Then set it up with the following parameters:
* Screen Size: 2.7"
* Resolution: 480x640
* Size: Small
* Density: hdpi

Once you save the device you should be able to go to the Android Virtual Devices tab, create a new AVD and select the one you made in the Device: drop-down.

Note, I am using the latest SDK, options and names may differ in an older version.
 
fahimeh hashemian
Ranch Hand
Posts: 85
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Steve Luke wrote:You will have to create a new device. On the AVD Manager, switch to the Device Definitions tab and press New Device (or start by selecting one of the devices which is close to what you want and pressing Clone). Then set it up with the following parameters:
* Screen Size: 2.7"
* Resolution: 480x640
* Size: Small
* Density: hdpi

Once you save the device you should be able to go to the Android Virtual Devices tab, create a new AVD and select the one you made in the Device: drop-down.

Note, I am using the latest SDK, options and names may differ in an older version.


Thanks for answer but i don't understand where is this parameters? I select Window in Eclipse, then select AVD manager and select New and I can select name, size and etc. Please more explain. Thanks.
 
Steve Luke
Bartender
Posts: 4179
22
IntelliJ IDE Python Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
When you open the AVD Manager in eclipse (before you press New) there are two tabs. One of them says Android Virtual Devices, the other one says Device Definitions. Switch to the one that says Device Definitions. Then press New.
 
fahimeh hashemian
Ranch Hand
Posts: 85
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
When i select AVD manager in Window menu, i see picture1 and when i select New, i see picture2 and when i select Start, i see picture3. How can i fix size and density of a emulator?


I write resolution 480*640 in picture2 and i select "Scale display to real device" in picture3 and write 3 for screen size but when i run the program with this emulator, the program opens a emulator with big screen ! Why?
picture1.png
[Thumbnail for picture1.png]
Picture1
picture2.png
[Thumbnail for picture2.png]
picture2
picture3.png
[Thumbnail for picture3.png]
picture3
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Sorry but i don't know why my pictures not show!


You can't link to pictures on your local machine. You either need to upload the images to some server and then use the the URL that they have on there, or attach them to your post via the "Attachments" tab.
 
Steve Luke
Bartender
Posts: 4179
22
IntelliJ IDE Python Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Sorry, can't help you then. That looks much different than what I get using the latest SDK. Maybe there is another tool somewhere in the <Android SDK>\tools\ folder.

edit:
Actually, that looks like the New you have there is a combination of what I have. So in screen 2 you set the resolution. In screen 3 you set how big the screen is and the density of you display monitor. Chances are if you have the screen size set correctly to the size of the Android screen, that you have the wrong monitor DPI, so the screen gets spread out. If you don't know your actual screen DPI you can estimate it by taking the resolution and dividing it by the size. For example, my laptop is: 1366x768 pixels and 13.3". Since 13.3" is a diagonal, the number of pixels along that line = SQRT((1366)^2 + (768)^2). That comes to about 1567 pixels in diaganol / 13.3" in diagonal = about 117 DPI.
 
fahimeh hashemian
Ranch Hand
Posts: 85
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for answer.
How can i find resolution of my laptop? 13.3 is inch or pixel? Screen of my laptop is 11 inch but i don't know how can i find resolution.

In opposite Monitor DPI in Eclipse write 96, Is it default or this is really true (is really Monitor DPI)?

Thank you.
 
Steve Luke
Bartender
Posts: 4179
22
IntelliJ IDE Python Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

fahimeh hashemian wrote:Thanks for answer.
How can i find resolution of my laptop? 13.3 is inch or pixel? Screen of my laptop is 11 inch but i don't know how can i find resolution.

In opposite Monitor DPI in Eclipse write 96, Is it default or this is really true (is really Monitor DPI)?

Thank you.


If you are using Windows, right click on the desktop and choose "Screen Resolution". This gives you the number of pixels used by the display. To get the physical size (in my example 13.3 inches) - if you don't know it then use a ruler and measure in inches.

The 96 DPI is just a default value, Eclipse can't calculate that for you (which is why it asks).
 
The human mind is a dangerous plaything. This tiny ad is pretty safe:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic