Android Emulator taking up whole screen - android

I am doing some Android programming tutorials, but when the emulator opens up it takes up most of the screen, which is much bigger than a normal phone looks like.
Here is a picture of my screen: http://i.imgur.com/gEuHs.jpg
And it doesn't let me resize the emulator. Are all emulators this big, and is there any way to make it smaller or resize it?

You can use a smaller resolution.
Alternatively, if you want to keep the same resolution, you can change the property "Abstracted LCD density" and check "Scale display to real size" when you start the emulator. Increasing the density will make the emulator window proportionally smaller.

You can try getting a bigger desktop, or adjust scale of window when it starts. Also, i don't recommend changing the dpi because it blurs the icons (framework-res.apk has only mdpi and hdpi drawables i think).

Related

android sdk. Background image fits. Foreground images too small

I have my view built to fit a phone screen 800x480. The background PNG shows up as a perfect fit. I have a bunch of imageViews of PNGs sitting on the view that should line up perfectly on any screen that is that size.
When tested on my phone, it works fine. However, when tested on my 7" tablet that has the same screen resolution, the backdrop fits as expected, but the imageViews are all too small.
Why wouldn't they fit the same way, considering the resolution is the same?
Could it be the aspect ratio of the second screen?
I know that when I developed an app on my Note I, it showed up differently on almost every other device with the same resolution, on account of the aspect ratio of the Note I being so wide.
Can you check and see the actual pixel ratio of your second device?
Also, is it showing the on screen action bar thing? The back/menu/etc bit? Because that could be because of the version you're targeting is less than the version of your 7" device, causing it to run in backwards compatibility mode. That'll squish your layout a bit as well.
I have a partial answer to this.
I couldn't find a way to set the size of the PNG itself. Only the ImageView height and width. So I set those to 90dp. I tried px first. Don't do that. It's no good.
But, check this out... Forcing the size in dp made the images show correctly on the tablet, but enormous on the phone! So, it more or less reversed my problem.
But at least I know what the problem is now. I just have to create a secondary view for 7" screens to set the imageView sizes. Or, I'm thinking there must be a way to do this problematically. Before the view launches, detect the screen size, if it's not a phone, change the height and width accordingly.
That should work because, as I mentioned in an earlier comment, the relative positioning is perfect. It's just the size that's incorrect.

Android Screen Sizes for different devices

I am new to android development and now i have started developing wallpaper apps.I saw the android developer page which tells the ratio 3:4:6 or something which i don't understand. Everything is working but the image which i set go off the screen sometimes it gets cropped around the corners and image does not look good. i use the screen size 600*480 in hdpi. Any suggestion about the different size images i should use may be for ldpi,mdpi,hdpi, xhdpi.I want my wallpaper look good in home screens of both tablets and for large size screen mobiles.
Thank You.
3:4:6:8 , so if you have 600*480 in hdpi then it should go like this
3k:300*240
4k:400*320
6k:600*480
8k:800*640
but since there are multiple device with same dp but different screen size, you can never quitly fit for every device

Android layout multiple screen

Sorry but i cant understand how i can draw a right picture for the right android phone size.
I readed the android documentation, and they say for i just think in screen size and density and not in resolution, so what size should have my picture?
For example,if i have a phone with size 1000x400(stupid example),and want a button(40x40) that will be in middle,what size should i do?? 40x40?? But in documention they say for dont look for resolution :\
Im confuse...
ps: The documention link Android multiple screens
Basically you'll have to realize that although resolution, screen size and screen density are separate attributes, they are still somewhat related. If your button is 40x40 as you mentioned, and that's the size you find looks good in the center on a hdpi(high density) device, you will have to scale it so that it fits accordingly on mdpi(medium density) and xhdpi(extra high density) devices. What I like to do is use PhotoShop or another graphical editor and resize my assets so that they fit on whatever density devices I'm trying to target. I make sure to always use *WRAP_CONTENT* for my height and width attributes and never fixed values.
Also, if you do not include these scaled alternatives in your res/drawable folders..you're basically saying that you're relying on the system to scale them for you, which can be a gamble. So I always go with resizing my assets so that I include a version for all densities. The link you posed explains everything pretty well

Android Emulator actual screen size

I want to optimize my app. I have a user with a Samsung Galaxy Note, 1280x800, 320dpi, Large Screen.
How do I set up the emulator's actual inch-screen size?
If I choose WXGA800 with 320dpi it makes a normal sized Version. How do I make it large?
Edit. Thanks for your answers, but that isn't the point. I know how to set up a an Emulator screen resolution and dpi. Actually I want an emulator to edit "layout-large-xhdpi" layouts but I get a "layout-normal-xhdpi" using 1280x800 with 320dpi in the AVD Manager. I simply want to change xlarge to large. Is there a way?
Edit2 Okay,found a workaround by temporarily removing the layout for normal sized xdhpi devices(Galaxy Nexus) and editing the Galaxy Note Layout as if it were some kind of "xhdpi" layout. But still it is strange to me, that it is impossible to edit directly a specific folder file like "layout-large-xhdpi". Found only in the Layout-Editor the possibility to add a screen size but unfortunately it won't make my layout.
Nevertheless I will have to make my layouts more flexible to have less problems ;-)
Thanks anyway
You can simply do that by opening your AVD Manager from Eclipse and when you are creating the emulator just check the Resolution radio button and input your desired screen size. Don't forget to change the density of the screen too. If you just want to emulate a Tablet you can simply make an emulator with Android API 2.3 or higher and it should have the desired dimensions..
#le chiffre : may I know why you want to increase the screen, as from my experience, if you use Eclipse then I think you can't increase the screen resolution of Emulator (if I'm wrong correct me please). The size of the emulator in landscape mode: width:800 and height:400 and I get this by this code
Display display = ((WindowManager) getSystemService(Context.WINDOW_SERVICE)).getDefaultDisplay();
int width = display.getWidth();
int height = display.getHeight();
and if you want to scale your application, pictures,etc., you need to get the device width and height, so you don't need to worry about screen resolution. But I don't think emulator size can be increased.
Thx and hope this helps!
In Eclipse when you start the avd, you can set the option scale display to real size and set the display size and dpi.
Window -> Android sdk and avd Manager -> start -> you will get option here

Android large-sized emulator produces regular size application in center of screen

I always used the standard emulator when testing and thought it was about time to see what it looked like in a higher res/density setting. I ran my application using WVGA854 which has a density of 240 (rather than the 160 I usually used). The result is my application sitting as its old size in the center of the screen. I don't specifically hardcode the application size anywhere that would produce this (except for background images, but there are other things like x,y positions that are still limited by the old size). What gives? I move over the high res images into the correct folders but it still appears to be forcing my app to a smaller size? The background below is set to 854 width in the HDPI (and MDPI folder) but it is still cutting it off? Using a surfaceView to draw the bitmaps.
Add the <supports-screens> element to your manifest, saying that you support large screens.

Categories

Resources