Bad dpi on Nexus 7 - android

I have incorrect UI on Nexus 7.
I have 10" tablet with mdpi, and my UI is OK. But on 7" nexus 7 all images and texts look very big.
I coped images from mdpi to tvdpi. and now, it is OK for me.
But, is it correct to have 2 folders with the same images? How to resolve these problems?

Read this properly. You will require different images for different pixel densities.
http://developer.android.com/guide/practices/screens_support.html
But, is it correct to have 2 folders with the same images?
You could do that but images won't look sharp because you are using MDPI images for XHDPI devices. You should understand after reading the guide.

Related

How to make images look good on both nexus and nexus 10?

I'm trying to make my app workable and visually better across all different screen sizes, but I have run into some issues. I have a simple image layout :
The images are sized 200 x 200 for small and 400 x 400 for the large. In the drawable folders I have made some smaller ones for smaller screens 100x100 , 200x200 and then 50x50 , 100x100. However looking at the list of devices in eclipse, the galaxy nexus 10 and the galaxy nexus both take their images from the xdpi folder. If I make the images work for the nexus its makes the nexus 10 really small and if I make them for the nexus 10 it messes up the layout for other devices. Why doesn't the nexus 10 just use the xxhdpi folder ?
How can I get around this issue ? I want to avoid separate layouts if possible as I've not attempted that yet as i'm still new to android programming.
How can solve this issue ?
Go easy on me as im still quite new. Thanks
edit
Listed as galaxy nexus in eclipse (720 x 1280)
and Nexus 10 (2560 x 1600)
as you can see major difference in sizes but use the same xdpi folder
You can declare drawables for different screen widths
drawable-sw720dp/
If you take a look at the android documentation.
It suggests that you create different layouts to support the different sizes.
If this become to much work you can restrict which sizes you support in the manifest.
So as i said in the comment above, I would create two folders, one for 720x1280 and one for 2560x1600.
I would then add a layout to each of the ldpi (low), mdpi (medium), hdpi (high), and xhdpi (extra high) if you want to try and support as many as possible.
Sorry I don't know any shortcuts. If i find anything else I'll add to this answer.

Multi-Screen adaptation android

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.

Drawable folders for high resolution handhelds

I can't figure out how to produce drawables for the new "high-res" handhelds like the Galaxy Nexus, One X, Galaxy S3 etc that have a resolution of 1280x720 or higher.
I always try to make as few layout-versions as possible. Preferably just one but at times a layout-long and notlong is necessary. And make the xml smart enough to handle all devices. But that's only possible if the drawable resources are there to supply all the different resolutions and sizes.
All has been nice and smooth until the new big phones arrived and I find that the drawables are to small for them. No xxhdpi-folder yet from Google so I must be doing something wrong.
I know it's forbidden to mention pixels here but still you have to use photoshop or some other pixel based application to make the drawables. Therefore you need to know how big to make these drawables.
This is what i've done so far:
xhdpi: 640x960
hdpi: 480x640
mdpi: 320x480
ldpi: 240x320
The problem is that when a 1280x720 device gets the drawables from the xhdpi folder things starts looking bad, the images are too small and there's too much space between them.
What do you base your drawable source files on? xhdpi in 1028x720? That messes up the lower res versions for me.
I have an ad agency breathing down my neck wondering why it doesn't look as perfect as on the iPhone...
Well, as I said above I can't find any handhelds with Android on it that's got a resolution of 640x960. So I based all my images on 720x1280 instead and put the 640x960 resolution stuff in a large-hdpi folder.
Now my app looks great on the latest Nexus, the Galaxy S3, HTC One-X and all of the other newer hires models. I think the tablets when looking for resources will go for large first, then hdpi where they will find the 2x scaled images.
This is what I ended up with:
xhdpi: 720x1280
large-hdpi: 640x960
hdpi: 480x640
mdpi: 320x480
ldpi: 240x320
I have a Galaxy Nexus, and I use the xhdpi resource folder (at a 2.0 scaling factor) and the images look great. Do you have an example (screenshot preferably) of what issue you're having? If you're hardcoding spacing and sizes in pixels, then yeah, it'll probably look weird at higher densities. Are you trying to hardcode a background image 1:1 at a specific pixel size? If so, that's never a good idea on Android.

android screen supporting for different resolutions in same density

I'm developing an application which supports xhdpi devices.
so I created layout-xhdpi and drawable-xhdpi folders to place my drawables
and layouts.but I'm having a problem when supporting different resolution in same density.
as an example samsung galaxy nexus and sharp IS003 detects same layout-xhdpi folder because it has same density but when I run the application in both devices,it displays buttons and
images at different positions because both devices got different resolutions.
am I doing something wrong? should I create different folders for specific resolutions?
I have read supporting multiple screens documentation and tried to declare layouts like res/layout-sw600dp/ but it wont detect for IS03.
Please help me to solve this problem.
why you kept drawable-xhdpi?. there is no android tablet with xhdpi.
check here:
all the 10 inch tablet is only mdpi.
if you check your device density it will show only 160dpi for tablet.
there is xhdpi device for normal phone nexus S ICS.
so move all your drawable-xhdpi to drawable-mdpi and check it will work.

Drawables and Layouts for Galaxy Tab and Motorola XOOM

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).

Categories

Resources