1

I am developing app for tablets which supports 7" 1024*600 resolution and 10.1" 1280*800 resolution. So in order to differentiate them I am making folder layout-large-mdpi for 7" and layout-xlarge-mdpi for 10.1". But while I run the app, it runs from layout-xlarge-mdpi folder for both the device. Can anyone please guide me on how to differentiate these two tablets through folders in xml?

nidhi
  • 763
  • 5
  • 17

1 Answers1

0

Make two different for layout also one layout for 7Inch as layout-sw600dp and for 10'inch as layout-720dp. and in the images make drawable also as drawable-large-hdpi(7Inch) and drawable-xlarge-mdpi(10Inch).

Check These resource folder image.

Ruchit Shah
  • 367
  • 1
  • 2
  • 10
  • I already tried that but it is giving exception if I dont keep any file in layout or layout-land folder and only keep file in layout-sw600dp-land and layout-sw720dp-land accordingly..........any idea why???? And if i put file in layout folder, it takes that file as default for both the device ..........???????? – nidhi Mar 29 '13 at 05:43
  • I have done these example theres is no need for layout and layout-land i have made that for mobile configuration. i have done these example and it is working succesfully. file show default only if u have used the same images for both...!!!! – Ruchit Shah Mar 29 '13 at 05:47
  • I got it!!!!!!!!! The reason it was throwing exception was that I was running that in the emulator with api level 9 while these folders are supported after api level 11...... – nidhi Mar 29 '13 at 06:50
  • @RuchitShah If i use sw600 and sw720 my android console shows no support for 800*!280 devices. what should i do? – Muhammad Umar Mar 30 '13 at 20:24