How to resize the AVD emulator (in Eclipse)?

前端 未结 11 999
栀梦
栀梦 2020-11-28 01:24

I\'m writing my first Android app for a small business that has some Droid phones. I set up an AVD for the phone with the right resolution: 854 pixels high.

I\'m wo

相关标签:
11条回答
  • 2020-11-28 01:49

    Another option would be to use the GenyMotion emulator, where you can actually resize the emulator window in real time. It is also much faster than the stock emulator.

    0 讨论(0)
  • 2020-11-28 01:52

    If you are working with Eclipse, than here's is what you can do if the size of the emulator is too big for you screen:

    1. Run > Run Configurations
    2. Pick the "Target" tab
    3. Scroll down to "Additional Emulator Command Line Options" and put in: "-scale 0.7" or another number

    This will keep the AVD scaled even if it is started automatically by Eclipse.

    Enjoy

    0 讨论(0)
  • 2020-11-28 01:55

    If you launch your emulator outside of Eclipse, using the android command, you will be able to scale the screen as part of the launch process. Not sure how to do that in Eclipse, though.

    0 讨论(0)
  • 2020-11-28 01:59

    The command to open in Command Prompt is given below

    1. emulator -avd [- []] ... [-]. for details see http://developer.android.com/tools/help/emulator.html

    To open a desired size emulator window follow the below command

    • emulator -avd "AVD_Name "-scale "Scale_Value"-dpi-device "dpi"

    Example:

    • emulator -avd "AVD_Name "-scale auto -dpi-device 160/200. with dpi-device value 200

    with dpi-device value 160

    So just change the dpi-value according to your need. Hope u enjoy.

    0 讨论(0)
  • 2020-11-28 02:02

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

    1. From command prompt run: telnet localhost 5554
    2. window scale 0.75
    3. quit

    Assuming there is one emulator running with on port 5554.

    0 讨论(0)
  • 2020-11-28 02:07

    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.

    0 讨论(0)
提交回复
热议问题