I tested my app on Galaxy tab 10.1 and found something strange.
I use a large image as title of app created for large screen. But when checked it, image quality is lowered.
I never touched image like resizing. Image resolution is fit so there is nothing to change.
When viewing same image on gallary, it seems almost same.
Only in app, image is deteriorated.
I using image folder drawble-xhdpi and layout folder layout-xlarge.
Is there something more i should check?
You should check what density the device you're testing on actually is. The Galaxy Tab 10.1 is an mdpi device, not an xhdpi device. Also, it's recommended not to use the large and xlarge qualifiers, and instead to use the smallest-width qualifiers (e.g. sw600dp for 7", sw720dp for 10").
Related
i have bsnl penta 7" tab. It comes under normal, mdpi, 455x800, screen size is ~5.4"(but tab is 7") when checked via code.
The real problem is, when running my application it loads images, size etc from \res\drawable folder (not a problem with mdpi also not loading from /res/drawable-large). So that the images and font will be small. Similar problem is occurring in some other smart phones too. How can be handled it.
I also configured an emulator similar spec to that tab and it works perfectly.
thanks in advance
I developed an android app that is designated to multi screens.
I have my background images in all kind of sizes. divided into sub-folders for hdpi mhdpi xhdpi and xxhdpi.
On my Galaxy S4 the pictures look great, but when i installed the app on a tablet of 8 inch screen with low density the pictures looked really stretched.
Am i doing something wrong?
just pot diffrent images in XDPI MDPI AND LDPI with same name
then Chek which one is getting detected in perticular device
then you knw it.
You are also creating a layout for each screen size? maybe the imageview is changing the size with each screen size.
What simulator resolution i should keep when developing application for Samsung galaxy s2 and galaxy s3 ?
What i found that samsung galaxy s2 has 480x800 resolution and s3 has 1280x720 resolution so what i have understood up till now that I should ask my graphics designer to provide me hdpi graphics that contain 480x800 background images and to implement same background image in galaxy s3 mobile, I will use image of size 1280x720 and put in xhdpi folder so that it can work on s3.
The background image is something which covers whole available area for mobile app. so am i right ??
You will need to create several emulators or get various devices.
There are some pretty important ones, so generally you need to make sure you have:
ldpi, mdpi, hdpi, xhdpi
and
small, medium, large, xlarge
Some people choose to exclude certain sizes (like small and ldpi) but htat's up to you,
if you go with some or all of the following, it should be a good start:
480x320 (SE Mini 10), 480x800 (GS2, Desire, etc), 1280x720 (GS3, Galaxy Nexus etc), 1280x800 (Note, Xoom, various other tablets)
HTC ChaCha (because it's landscape default)
You need to make sure you create resources in the relevant folders for each density, usually, I tend to ignore ldpi and just put resources in:
mdpi,hdpi and xhdpi (mdpi will be scaled down for ldpi devices,
automatically)
You may also need to create various portrait and landscape layouts in different sizes.
Reading this page provides most of the necessary information:
http://developer.android.com/guide/practices/screens_support.html
This page also contains important information regarding size distribution and popularity that is constantly up to date:
Android Stats
One thing that Android does for you is that it manages resolution. If you use the proper size formats (dp, sp, etc), your layout will scale to almost all resolutions. If you place images in the proper drawable folders (hdpi, ldpi, mdpi, etc), the OS will also swap those out as necessary.
Also, the emulator should handle resolutions for specific devices, if I recall correctly.
Desing lazout in smart way! Usualy it means don't put to mutch content in one layout.
Make sure that evrything looks good on smallest size and bigest size. It is better to treat tablets separetly. Read how providing alternative resources works, you can build sepereate layouts for each screen size.
Check if the hardware is available on that device before using it. hasSystemFeature() can be used for checking.
As you know Samsung Galaxy Tab's (7.4") screen resolution is 1200x600 and dpi is 160 normally, but Samsung reports its density 240 dpi.
So, i created hdpi graphics for galaxy tab and put them in drawable-hdpi folder.
But i noticed that after install custom ICS rom to Galaxy Tab, galaxy tab starts to report its density 160 dpi. So it show mdpi graphics.
I wonder could i do something in my application to handle this special situation; because i know i replace drawable-mpdi graphics with drawable-hdpi graphics, lots of device will have problems with app, this time.
If it is only for the situation explained above, you can use the "Platform Version" qualifier. (Refer to Providing Resources)
drawable-v14 for ICS and accordingly for other versions. You can also use drawable-hdpi-v14 for fine grained control.
I take it you are talking about the GT-P1000, and it is the only exception to have HDPI density instead of MDPI for that size. I use drawable-large-HDPI for it next to a drawable-large-MDPI folder for all other similar sized tabs and thus have different resources for both.
I'm testing my app at Galaxy Tab and Motorola XOOM emulator skins, and I can't understand, why the drawables are taken from the wrong folders. I have drawable-xhdpi folder, where I store big size pictures. However, Tab takes drawables from drawable-hdpi, and XOOM uses the drawable-mdpi folder. So, how do I manage my resources? Thanks in advance.
In addition, it feels like view sizes defined in sp are not ported properly. I have some views which need to be 80sp x 80sp, on phones with mdpi and hdpi screens they look right, but on tablets they look too small. Why can this be?
However, Tab takes drawables from drawable-hdpi, and XOOM uses the drawable-mdpi folder. So, how do I manage my resources?
There is no single "Galaxy Tab" device, so I have no idea which one you are referring to there. The XOOM is an -mdpi device. I would expect that the Galaxy Tab 10.1 would be -mdpi as well. However, in the end, device manufacturers will choose values that they feel deliver the best results for existing applications.
GalaxyTab 7" use "-large-hdpi"; XOOM 10.1" use "-xlarge-mdpi".
check this post for details:
GalaxyTab, Motorola Xoom Screen Desity and Size
I have test with multiple screen resolutions and find out Android use the following qualifier for different screen resolutions:
240x320: -ldpi
320x480: -mdpi
480x800: -hdpi
GalaxyTab7.1 inches: -large
GalaxyTab10.1 inches: -xlarge
Hope this information is useful for you.
Galaxy tab (the old one, running Android 2.x) is indeed not xhdpi. I had success by using the "large" qualifier to identify tablets. Else you can always use an API qualifier such as v11 for Honeycomb only resources.
Rather than using the dpi qualifiers you can use screen size qualifiers instead, theres info here on exactly what tags you can use when selecting which resources to use,
http://developer.android.com/guide/topics/resources/providing-resources.html
It's important to understand the difference between dpi and screen size, dpi tends to be high on phones, like a samsung galaxy s2, but on the big 10 inch tablets it tends to be low(which makes sense if you think about it, the phones squeeze more pixels into a smaller space).