question

tinyroberto7 avatar image
tinyroberto7 asked

Wrong resource folder decetion

Hi! I have an application which is optimized for tablets, but I got crashes: [i]Caused by: java.lang.RuntimeException: Binary XML file line #10: You must supply a layout_height attribute.[/i] That is why I wrote a "density tester" app and I got strange results in the tester: #1: Fire HD 6: https://www.dropbox.com/s/ifw5nddkzlkwewv/amazon_device_01.jpg?dl=0 It's a phone category, read from values so it's ok. #2: Fire HDX 8.9: https://www.dropbox.com/s/enj513malip8xx4/amazon_device_03.jpg?dl=0 It's a large tablet, read values from values-sw720dp folder. #3: Fire HD 7: https://www.dropbox.com/s/jt51dl6918q2aed/amazon_device_02.jpg?dl=0 And here is the problem because this device read the values from simple values folder instance of values-sw600dp folder! I check the android documentation and check the same android device (7col, 1280x800) and everything was ok. What is the solution for this problem?
fire tablet
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

Nick Gardner avatar image
Nick Gardner answered
Hi, The best solution for this problem would be to provide default values as a fallback for when a tablet does not use a specific sw values folder, so you could put the default ones in the straight /values folder.
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.