android design Galaxy 2 and Galaxy 3 - android

I'm trying to create an android app optimized for Galaxy S2 and Galaxy S3.
I created the images for Galaxy S3 and I put them in the xhdpi folder.
After that I reduce the images 75% and put them in the folder for hdpi (according to Android Guidelines for multi-density).
The problem is that the S2 do not only have lower density also the screen is smaller so the images resized only 75% are too big to be used.
Example: a full width image in Galaxy S3 will be 720px wide, the 75% is 540px that is bigger than 480px wide that I need for full width in Galaxy S2.
The problem is that I have at the same time 2 different densities and 2 different screen sizes.
How can I handle multidensity + multi sreen size?
Should I do it only creating the specific images with the specific sizes for G2 and G3 or there is a way (by code) to tell the phone to auto adjust the image to a certain size (for example I provide an image that is originally width 540px but I tell the phone to rescale it to 480px to be adjusted full width in Galaxy 2.
I'm clear that the images for G3 must be xhdpi and G2 hdpi, but the question is more about how to handle the different screen sizes wisely.
Thanks,
David

Related

Android layouts - Would it be reasonable to create more Layout Folders than sw320, sw480 sw600 sw720 sizes?

In order to support different screen sizes in an Android App, I have created different layout versions: sw320, sw480 sw600 sw720
But I notice that many mobile smartphones takes the version of sw320 while they do represent the page differently.
For example when running on the following devices:
Nexus One and
Samsung Galaxy s7
both takes (from some reason) the sw320, Why is that?
And would it be reasnable to add more layout versions to the code?
Nexus One and Samsung Galaxy s7 both takes (from some reason) the sw320, Why is that?
The Nexus One was an hdpi device with a screen resolution of 800 x 480 pixels. Its shortest width is 480 pixels, which is 320dp.
The Samsung Galaxy S7 should be an xxxhdpi device, and its screen resolution is 2560 x 1440. Its shortest width is 1440 pixels, which is 360dp.
Hence, both devices fall within your -sw320dp bucket, given your other buckets.
And would it be reasnable to add more layout versions to the code?
IMHO, you should have fewer versions, not more. You should be using layouts that are more fluid and can adapt to small variations in screen size. Having different layout resources entirely should be reserved for cases where a major change in UI is called for (e.g., the classic master/detail pattern implementation, between phones and tablets).

Galaxy S3 and Galaxy S4 with layout-sw360dp

Kindly I want to know why Galaxy S3 and S4 get the images from this folder (drawable-sw360dp-xhdpi)??
all images seem very large for these devices !
also If I make these images smaller they will not be suitable for larger devices !
Please, what is the solution?
I assume you are using layouts for 10 inch and 7 inch devices are layout-sw720dp and layout-sw600dp then you just create drawable-sw720dp and drawable-sw600dp, also in the case of high density for those xlarge and large screen devices then append the corresponding density to the drawable folder . For example use drawable-sw600dp-hdpi for high density 7 inch tablets like ASUS MeMO Pad HD 7'. Now resource for large and xlarge are solved
Now Consider the drawable-sw360dp devices.
drawable-sw360dp/layout-sw360dp are for phablet devices like Note1,Note2, Micromax CanvasHD,S3.
The above mentioned devices are XHDPI devices. For using drawables either you can use drawable-xhdpi or use drawable-sw360dp-xhdpi
Thus you can distinguish resources for s3,s4 from xlarge and large screen devices.
Note : S3 and s4 taking images from drawable-sw360dp-xhdpi because smallest width of those devices are 320dp. You can check the device display information by installing screen info app from the playstore.
check screen info app here
res/drawable-mdpi/my_icon.png // bitmap for medium density
res/drawable-hdpi/my_icon.png // bitmap for high density
res/drawable-xhdpi/my_icon.png // bitmap for extra high density
http://developer.android.com/guide/practices/screens_support.html
It is based on the dpi
even now there is a xxhdpi folder or I may be wrong on that one??? Some one else to confirm that?

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.

Android Screen Sizes and Densities

I am considering to drop support for small screens in my app.
Recently I have stumbled upon Screen Sizes and Densities and currently (2011-10-01) it says that 3.5 percent of the active devices fall into the small/hdpi category. I wonder what device actually has a small screen with high pixel density?
I know of the HTC Wildfire which has 240 x 320 pixels, 3.2 inches (~125 ppi pixel density). If I understand correctly that would be an ldpi device. For my app the Wildfire has a share of somewhere around 2 percent.
So first, why does Screen Sizes and Densities not list anything under small/ldpi? And second, what would be an example of a small/hdpi device?
There are some device from Dell like Aero which comes under small/hdpi.
HTC Tattoo can be considered under small/ldpi
Just to add to Basavraj's answer, Guessing the screen size is not that simple. Like Galaxy note has 1200 X 800 screen dimensions but it's screen size falls in large(and not in extra-large) category.

Problem in screen resolution

I have created an app.During creation i have used Nexus s device for testing of my app.But i want my app to support multiple screen.So for that have created separate layout for small device, medium device and so on as suggested in android support multiple screen documentation.Now my problem arise in maintaining layout for Nexus s device having resolution of 480 x 800 pixels and Samsung galaxy ace having resolution of 320 x 480 pixels (ie HVGA devices) because both these device uses same layout folder not like other small/medium device which take its layout from layout-small/layout-medium directory.So its very difficult for me to manage the layout for nexus s device and Samsung galaxy ace device/HVGA devices,because if i manage layout for nexus s devices than its not fit in HVGA devices, similarly if i maintain layout for HVGA device than its not match for nexus s devices.So how can i create separate layout for these two range of devices,because in the documentation it is given that for devices having resolution of 320x480 mdpi, 480x800 hdpi, etc would used the same layout.So please help me to solve this out.
If you use dp/dip (density independent pixel) units in your layout instead of px, everything should be fine.
Did you use fix size for the width and height in your xml? I think if you want to support different screen resolution, you have to use the standard android code for layout width and height. And be sure to use draw9patch in your images.

Categories

Resources