Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

Android Build a Simple Android App (2014) Creating the Screen Layout Getting to Know Our Tools

emulator size too big

how can i resize the emulator to fix my screen here is the link http://grab.by/GE9U

2 Answers

First click AVD Manager

Then click + Create Virtual Device...

Next select the device you wish to use (I suggest Nexus 5) and click Clone Device...

On this screen you can select the amount of RAM and change the device name, but I would NOT suggest changing any other settings here (I will show you how to change the screen size a more appropriate way in a second)

Click OK

Find the device you just cloned (Whatever you renamed it to) and select it and then

Click Next

Select the default API for the phone (Basically do not change anything)

Click Next

On this screen you will see a drop down menu Scale. Use this to scale the phone/tablet accordingly

I suggest 4dp to 1px but you can play around with it if you like!

Then simply click Finish and give it a few moments to create your new emulator that is scaled properly :)

In the video it seems he is using an older version of Android Studios so the layout is a bit different. I also use my own devices while testing instead of an emulator so I am unsure of a few other ways to do what I just suggested. (He actually shows you a way to scale you device but I think the menus have changed since the video)

I apologize if the steps are unclear due to a different operating system having a separate default layout.

If this does not work or you are having trouble please let me know!

The following actually worked for me:

(I used '0.5' for the value, and that was a good size on my 1920x1200 screen.)

  1. From the top toolbar In Android Studio, click 'Run>Edit Configurations...'.
  2. On the left side, select your current app (its probably selected already).
  3. Click on the 'Emulator' tab.
  4. Check the check box next to 'Additional command line options', and type (without the quotes): "-scale 0.75" (for 75% percent of the original size, or use 0.5 for 50%, etc.)
  5. Click 'Apply' down below, and then 'OK'.
  6. Run your emulator.

(found it here: http://stackoverflow.com/a/29975459)