Multiple Screen Size support in android

Monica28

New member
Dec 6, 2012
4
0
0
Visit site
Hello All,
I m facing problem in Android since many days but didnt get solved
1. I have 3 folders for images thats is mdpi,ldpi,hdpi
2. I have 3 layout folders for small screen,medium and high screen

but still in normal screen layout many device comes in this range but stilll in many case it is working properly
Plz kindly help if any solution .Kindly post any example layout if possisle that works on allmost all device
Thanks if any help
 

Shadowriver

Well-known member
Jan 5, 2012
697
9
0
Visit site
I'm assuing you devlopering an app :) There 2 solution for that (i case of layout):

1. If you plan to make app have same style on any screen, you can create one layout file with all elements possible and by detecting screen size and other parameters make especific elements visible. Remeber to use dip or dp units not px which ignores pixel dencity. It's inconvetional way to do it but it might work, it gives more freestyle but requires more maintaining and testing on other devices. Thats how websites deal with it (if they deal with it)

2.Use what you already using (i assume you use categorization by surfixes), check what that device that you think picks wrong layout, check what parameters it picks and try to fix it. You might try to force layout by code... but im not sure if thats possible, my Android developer advantures did come to deplyment level to care about htis stuff.

But in general is best to make strachy layout as default layout that will strach by it self and it will work on any screen. Remember you are director of the show, you are magician, no body look on your code (or else what you doing is your official job), so you can always do some hacks to achieve something, think out of the box :) if somebody one day gonna point you better practice then you can always correct it... but if it works it really does not matter as long it does not look ugly to user.

In case of graphics, you need to trust a phone, if it picks wrong density for your graphics it's phone fault not yours... or else it use some untypical density you might try to add it

Also read this:

Supporting Multiple Screens | Android Developers
 

Trending Posts

Forum statistics

Threads
942,402
Messages
6,913,898
Members
3,158,397
Latest member
maximusdebois