Wednesday, February 27, 2013

Android emulator taking too much of screen size?

Using AVD Manager

Open AVD Manager

If using eclipse then Go to Window -> Android SDK and AVD Manager -> Virtual Devices

Select the AVD you want to launch and click Start

Check the "Scale display to real size" button

Enter how big you want it to appear in inches and press Launch. For this to work, you'll have to also enter a reasonable approximation of your mac's screen resolution. I'm using 7 inches and 113 dpi for my 13" Macbook Pro, but you may be able to get away with 8 or 9 inches.

While debugging (add this to command line)

This is actually possible from your project as well, no need to start the emulator through the AVD manager:

1) go to Run > Run Configurations... > (Select your application on the left hand side) > (Click the "Target" tab on the right hand side). 2) At the bottom there, you'll see 'Emulator launch parameters'. In the 'additional emulator command line options', add '-scale 0.75' (to make the screen 75% of full size)

Next time you start the emulator it will have scaled properly, hooray!

Change when the Emulator is running

Source: http://stackoverflow.com/a/6049246

There is also a way to re size the emulator through a windows command prompt.