specific 4 inch drawable layout? - android

I want to design a specific layout for galaxy S3 mini or any device with 4 inch screen size, now I don't want to use normal-layout because what looks perfect in other devices in normal-layout looks messy in 4 inch devices, I tried to do a layout for 480 x 800 like layout-w480dp-h800dp but it didn't work so what specific layout can I use?
Thanks in advance.

Related

Design Special Layout for Nexus 5 Dimensions

I want to design spesific layout for Nexus 5 dimensions. Because it is working with xxhdpi but this layout also working in pixel 3A. Therefore I want to design a layout and it will just work Nexus 5 dimensions ? How could I do it ?

Android: Image button size for multiple screen sizes but with same density

I am writing an Android app to have a matrix of image buttons. I tested it with 2 devices: Galaxy Note 1 (5.3") and Galaxy tab 8.0 (8.00 "). When the source images are put in different density drawable folders, both devices took the images from hdpi folder. However the screen sizes are different. Buttons displayed correctly on tab 8.0 but too big on Note 1 (buttons are not all shown).
In this case, what is a better approach for this. Thx a lot.
Galaxy tab 8 is kind of tablets & its density as Galaxy Note one so you should put Galaxy tab image in
// for Phones
drawable-ldpi
drawable-mdpi
drawable-hdpi
//for 7 inch tablets
drawable-large-mdpi
drawable-large-hdpi(for Nexus 7)
// for 10 inch tablets
drawable-xlarge-mdpi
reference : this answer

Android Layout: same device size family, different real device sizes

Just a quick question:
My application should work both for my device (Galaxy Ace - 320 x 480 - "Normal" screen size family) and for the Galaxy Nexus (720 x 1280 - "Normal" screen size family).
I wrote two layouts in two different folders: layout and layout-sw600dp.
Unfortunately the Galaxy Nexus keep to choose the xml definition in the "layout" folder instead of "layout-sw600dp" one.
How can I solve this?
Thank you in advance.
(Thanks to #Class Stacker)
For everyone who has the same issue: put the layout xml file for the Galaxy Nexus in a folder called "layout-xhdpi".

How to create different layout for Nexus 4 and similar devices? (Galaxy S4)

The question is how create a specific layout for Nexus 4 and similar devices?
4.7" diagonal
1280 x 768 pixel resolution (320 ppi)
WXGA IPS
For Nexus 4 should load the same layout that Galaxy S3
Galaxy S3
Screen Size: 4.8 inch
Screen Resolution: 1,280 x 720 pixels
And the configuration should be:
For same layout landscape and portrait layout-sw360dp
Only for landscape layout-sw360dp-land
Only for portrait layout-sw360dp-port
Other similar devices:
LG Optimus 4X HD
HTC One X+
For Galaxy S4 should also compatible and load this layout
The response was in this entry: Android S3 layout vs Galaxy Nexus layout
You can create layout directories for specific combinations. For 7" 1280 x 768 at 320 ppi it will look something like this:
layout-sw600p-xdpi-large
As #Tomer Mor mentioned, you can find a full list of available parameters here
Also, if you want to be even more specific about device parameters, take a look at this question - you can assign different layouts from code, depending on the environment.

fragments on the 7 inches tablet

Can I use android fragments with 2 columns layout on the 7 inches android tablet? It has got 800 x 480 resolution.
When I use it on my smartphone with resolution 480 x 800, it shows as one column layout.
Yes.
Since the screen size of smartphone is small, the fragments are shown as a separate activity whereas in tablet it is shown in 2 column layout.
Moreover, it is not related to screen resolution
Refer this: http://developer.android.com/guide/practices/tablets-and-handsets.html

Categories

Resources