Android Emulator Size Settings - android

I'm trying to test my app on a number of different sized screens to make sure it displays correctly. I'm finding it hard to setup the emulator to show the different sized screens. Can someone please help in providing the settings needed to show an emulator for x-large, large, medium and small sized screens please?
Any help in working with the emulators would be greatly appreciated.
Regards

When you run your AVD, there are two tabs:
1 - Android Virtual devices with devices you created.
and
2 - Device Definitions -> click on this one.
Now you can pick different devices with different screen sizes, densities, resolutions...basically all the important combinations you would want to test it with(and more)
Select one and click on the right side menu button -> create AVD.

Related

Why does Android Studio show different DPI settings for two identical devices?

I'm having trouble understanding this weird behavior. In my "Android Virtual Devices" settings, I had two devices that are both 8.0-inch tablets with 800x1280 screen resolution. However, one is categorized as "tvdpi" and the other one is categorized as "mdpi". The only difference is that the "tvdpi" device was created earlier (in Android Studio 2.1 or something) and the "mdpi" device was created in Android Studio 2.3.
This has created a problem where I can't see what the final layout will look like in the layout editor. When I ran the app on my real device, it's running a layout same as the simulated layout in the "tvdpi" device, but not the "mdpi" device. I'm afraid that if I delete the "tvdpi" device, I will never get it back and my layout editor will forever look different from the real device.
Because they are not the same device. Note the name column, both devices are called different. They may have the same physical screen size. But the density of each one is different to the amount of pixels.
I submitted a bug report to Google and it's being worked on.
https://code.google.com/p/android/issues/detail?id=246595

Different Designs and Different screen sizes and Densities

I have read an much more documents on android and other blogs about how to support multiple screen sizes. And To some extent I am successful in making some good looking designs for apps. Now let me start from the start what is the problem and what I wanted to ask from you guys.
Android has now different screen sizes of different screen densities and having different resolutions. so We have to face 3 different things the size , density and the resolution.
Now Let take example of Samsung s4(xxhdpi device having 1080*1920px) , Samsung Grand (hdpi 480*800px) and both has same screen size that is 5 inch
and Samsung galaxy note 10.1 (Mdpi devices ) 10 inch screen size.
Now android says to make different drawable and put them into respective folder, its ok, let suppose its done. Now what ?
lets suppose , What if I have to set the image in left top with the marginleft of 5 dp and some other views according to them with different specific paddings and margins in dps and suppose I have set all of these in my layout according to hdpi device, which we know is not going to look good in samsung s4 xxhdpi device and tablet.
and Also as design pattern says to change design for the tablets according to your need , but on the other hand the support of making different layout has been deprecated now we have to use different values folder.
so in short what is a best way and what is clear thing for making drawables.
how should we re size our drawables to support all devices , and also if making different layout has been deprecated now what should we do to make our design look good and approximately same in all devices?
also how to judge that device is tablet and we should now start showing the multi pane design ?
please do not refer me to android developer website , I know its very helping and I learnt a lot from there , but right now I just want to discuss the technical issues and want to take advantage of some experienced developers. Thanks

Android Resource Scaling For 4.65" and 4.7" Emulator Not Correct

I have layout xml files for default, default-land, sw480dp, sw480dp-land,sw600dp, and sw600dp-land in an Android project I'm working on. All emulator's scale my resources correctly except for the 4.65" and 4.7" emulators in Eclipse, and does not scale the ad space, or my buttons correctly. These emulators seem to be pulling my default layout resources, but the scaling is wayyy off, and I am not sure why this is. I've tried adding a new folder for sw720dp, but this pulls up the 10" tablet emulator, and does not allow the 4.65 or 4.7 inch devices. Can anyone give me some clues as to what might be going wrong here? I'm done with all my functionality, and was just testing out all devices before submitting the app, and now I've hit a road block. Thanks!
P.S
Not sure what kind of info you'd need to help me out with this, code wise, so let me know what might help you, and I'll insert it!

Difficulty in replicating Screen layout issue

I have a settings tab page in my application. It works perfectly for all users, except one with HTC WildFire phone.
I have implemented all good practices suggested by Android to have multiple assets for different screen sizes and screen densities.
But still for this user, when he opens Settings tab page, the tab takes most the screen with a big box and very less space left for actual settings to appear at the bottom.
I don't have a HTC Wildfire phone. Is there a way, I can create emulator that would match exactly to HTC Wildfire screen and replicate this issue ?
Expert opinions are appreciated.
Namely that device was our worst case platform. No matter what we tried, we couldn't overcome some of its quirks. I remember weird ListView separators, borders around images - and there was something else as well.
So it may be just the device. But we also did manage to adjust a lot on an emulator with the corresponding (low) resolution. Yes, you should create one.

Android Emulator loading wrong layout screen sizes

I have written an app that required me to create the following additional folders in order to support multiple screen sizes: layout-land, layout-small-land, and layout-small-port.
When I load an AVD for a QVGA screen, the emulator is loading the screen sizes from the HVGA settings, and I need to know how to force the emulator to load the correct files. I know it's loading the incorrect files because initially when I loaded the QVGA AVD, all of the text was too large, so I spent a few hours adding new versions of all my activiti files to the layout-small-port folder, then I retested and saw normal-sized text for the QVGA screen, and then I turned off my computer. The next time I turned on the computer and loaded the app in the QVGA AVD, suddenly all of the text on screen was super-small and barely readable. So, I proceeded to delete all of the new files I had just added to the layout-small-port folder and re-ran the QVGA AVD, and all of the text appeared correctly.
This morning I have loaded the QVGA AVD again, and once again the text is too large. Before my latest round of updates, the data in the QVGA screen had always appeared correctly, but now everything from the menu sizes to the text on screen is not being scaled to QVGA-sizes.
Do I need to re-add all of those screens for layout-small-port, or is there something going on in the emulator that I can fix?
I have set the text sizes in the affected activities using "dip" (i.e. 10dip). In my Android Manifest file, I set minSdkVersion=3 and targetSdkVersion=4 so that people with Android 1.5 can still download my app. My app is built against Android 1.6.
You might want to check this out:
http://blog.blundell-apps.com/emulator-settings-for-each-android-density/
It explains how to set the emulator for different density buckets (ldpi, mdpi .. etc) these are much easier to user than layout-large (which I believe is being deprecated anyway)

Categories

Resources