Android: How does dp work, and can I test it? - android

I was wondering, I now have an app that makes a grid of 16x16 buttons which are all 30dp wide. That makes a total of 480dp. In the emulator it runs fine (which runs at WVGA). Can I change the screen size of the emulator in any way to test if my app runs fine on lower and higher screen resolutions?

You can define different AVDs using the AVD manager. When you launch the AVD, you can specify a virtual-to-screen scaling, which will also affect the density that the emulator will use.

Yes, of course. You can do that in the AVD manager. Start your virtual device from AVD and a little dialog will pop-up asking you if you would like to set a custom size for the device. Alternatively you can create additional avd entries.

Related

AVD of xxhdpi device doesn't start

I have to emulate an HTC One, so I set a Device like this:
But, when I start the AVD, the AVD goes black, and doesn't boot.
How can I fix this?
That's because your monitor doesn't have that many pixel per inch. To start it when you launch the emulator select scale display to real size ,click on the question mark and select the monitor's screen size in inch and resolution, it will then automatically calculate monitor dpi. Also edit emulator to make use of host GPU as others have suggested. If your GPU is weak the screen of the emulator may blink and it will be even slower than normal emulators.

android emulator for large screen xhdpi not working

I created custom device with configuration- screen size 5.3 inch and 900x1480 resolution.
Then i created AVD with different OS versions, but emulator never launches. It shows up emulator screen but all the time there is only black screen, not even showing "Android". In DDMS LogCat there are going on some actions but for me it looked like its one big loop repeating.
Also i tried to emulate HTC One (normal-xxhdpi) but there is same problem. In this case it may be there isnt updates made to support xxhdpi.
that happen to me if i set more than 786MB in RAM you should use 512 MB and the emulator will launch
Try selecting "Use Host GPU" in the virtual device settings.

Android AVD Screen Too Large

THe AVD setting for Android 2.2 seems too large on my computer, and this is the default value. How can I create one of normal size. Thanks
I'm not the only one: Android Emulator Screen Scale too Large
Right-Click on your project, go to Run As-> Run Configurations, click on the tab 'Target', at the bottom you'll see 'additional emulator command line options', add '-scale 0.75' (to make the screen 75% of full size, set the value to what you want to scale)
I had the same issue. My emulator window was bigger than my computer screen resolution. I did what DoNotCheckMyBlog said.
Choose a smaller screen resolution
Run emulator
Revert back to the original screen resolution size
The emulator will fit.

How do I take Android Screen shots at the right size for publishing?

I'm sorry if this is a daft question but I appear to be missing something.
I am trying to publish my first app and I need at least 2 screen shots. I have taken these using DDMS in eclipse which produces an image 240 by 400. The market requires an image that is at least 320 by 480!
How do I generate a screenshot of this size?
Create an emulator from Eclipse with the required screen-size and run your app in the emulator and then use DDMS to take the screenshot.
From Eclipse: Window > Android SDK and AVD Manager. Create a New one. Specify a screen resolution of your desired size.
Create an AVD which has an HVGA skin/resolution. HVGA is by default 320x480.
Run your application once more using this AVD and use DDMS to take screen shots.

Set android screen resolution

I'm trying to alter the default screen resolution of the Android emulator (and by extension, the Android device) to work at 1700x1200. In other words, I need the screen to be able to display unique points over that range.
I have set the dimensions in my layout file, yet the device still defaults to 320x480. I've set different dpi densities, but to no avail.
Any help would be great, even just a direction to explore.
EDIT: Thanks for the two responses. I guess my question wasn't clear - I understand that the top resolution for the device is fixed, but I need to scale the screen to display with finer granularity than just 640X850 (which I believe is the highest resolution). I understand you can set dpi density from 120-240, but I need to know how to set the scaling functionality to simulate a screen of 1700x1200. My guess is that it will have to be done by my code, but I would prefer for the platform to auto-scale it down for me. This may not be possible, but I just wanted to check.
Using Android SDK 2.0 or 2.1 you can create an AVD with a custom resolution. If you want you can also run the emulator with the -skin argument, for instance emulator -skin 1700x1200 and you'll get what you want.
May be i'm not completely understand that. You want physical device such as ADP1 phone for example, to have 1700x1200 ? If it that you want - i have some bad news - if you look at any device spec you'll see resolution listed. It's there because it characteristic of physical screen. It can't be changed.

Categories

Resources