I am developing a Calculator App which have a Relative Layout for Portrait Mode. All Buttons and TextViews are placed in this single Relative Layout and a same Relative Layout for Land mode. I have been digging web for almost 15 days but found nothing relevant. My App also have support for Tablets. MinSDKVer is 14 and Target is v21.
Currently I am trying these Layouts folders
1:layout-sw400dp (intended for Note 3 and Mate 7)
2:layout-sw600dp (intended for 7" Tablets)
3:layout-sw720dp (intented for 8.9" and 10" Tablets)
4:layout-small-ldpi
5:layout-normal-ldpi
6:layout-normal-mdpi
7:layout-large-mdpi (intended for 480×800 phones with screen >5" like Pantech Sky Vega Note)
8:layout-normal-hdpi
9:layout-large-hdpi (intended for Galaxy Note 2, Galaxy Note and Galaxy Mega)
10:layout-normal-xhdpi
11:layout-normal-xxhdpi
12:layout-large-xxhdpi(intended for Galaxy Note 4)
13:layout-normal-xxxhdpi(intended for Nexus 6 and for other QFHD Phone)
All these layouts have land mode.
Problem arouse when I placed (layout-sw400dp). Nexus 6, Note 4, Note 2, Galaxy Mega and Large 480×800 phone started using this layout rather than intended layouts.
This is happening because swdp has a higher precedence than layout-normal-xxxx or layout-large-xxxx.
Note 3 and Mate 7 are 400dpi devices that is why I placed layout-sw400dp. Before that all devices were working perfectly except, Note 3 and Mate 7.
And other problem is devices with 540×960 resolution.
I have tried layout-320dp. By using this xhdpi devices and xxhdpi devices started using this layout.
I have also tried these layout for 540×960 But these did not work even after making seprate folder for layout-long-port-800×480.
1:layout-h960dp-w540dp
2:layout-long-port-960×540
3:layout-normal-960×540
I took all screens reading from Android Virtual Device Manager by creating different devices with actual specifications.
I have tried manually setting layout for 540×960 devices in java file and succeeded but I don't want to do that and I don't want to use Linear layout either.
I have thoroughly studied "Android Different Screen Support and Providing Resources".
Please tell the name of all required folders for layout to support all android devices or any other efficient way to do this using java.
I have uploaded all resources files on Mediafire you can Download Calculator Layout.zip
Any suggestions and solutions will be appreciated Thanks in advance
Sorry for English because it is not my native tongue.