Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialMUZ140537 Kudakwashe Betera
4,875 Pointsemulator size too big
how can i resize the emulator to fix my screen here is the link http://grab.by/GE9U
2 Answers
Andrew Gay
20,893 PointsFirst 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 :)
Sean Cramer
994 PointsThe following actually worked for me:
(I used '0.5' for the value, and that was a good size on my 1920x1200 screen.)
- From the top toolbar In Android Studio, click 'Run>Edit Configurations...'.
- On the left side, select your current app (its probably selected already).
- Click on the 'Emulator' tab.
- 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.)
- Click 'Apply' down below, and then 'OK'.
- Run your emulator.
(found it here: http://stackoverflow.com/a/29975459)
Andrew Gay
20,893 PointsAndrew Gay
20,893 PointsIn 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!