Differentiate drawables and layout betwean Galaxy Tab 10.1 and KF HD 8.9
Hello guys, we face this issue and get stuck. Galaxy tab 10.1 1280x800 mdpi = sw800dp Kindle Fire HD 8.9 1920x1280 mdpi = sw800dp drawable-sw800dp values-sw800dp Our app have lot of rasterized graphics asset so it's invitable for us to differentiate this two cases and give Fire HD different assets. Is there any way to do this ?
Hi, To target sw800dp devices and specify Fire or Galaxy Tab, the best approach is to use "layout-sw800dp-hdpi" for the Kindle Fire HD 8.9", and "layout-sw800dp-mdpi" for the Galaxy Tab 10.1. However, there is an Android bug that affects the emulator and some Android devices which prevents the proper loading of "layout-sw800dp-mdpi", so this approach might not work. However, Kindle Fire HD 8.9" properly loads from "layout-sw800dp-hdpi", Please let us know if this works for physical device Galaxy tab 10.1 If the best approach does not work thanks to the bug, there are a few options: 1) The next best option is to use "layout-xlarge-hdpi" to target the Kindle Fire HD 8.9" and "layout-xlarge-mdpi" to target the Galaxy Tab 10.1. This works since both devices are "xlarge". It does not guarantee sw800dp but works for targeting these two devices in particular. 2) Another option is to have two separate layout files for Kindle Fire and Galaxy Tab, then query for device name and in code load the proper resource file. This approach is not recommended, since it will lead to the application checking for more and more devices as the application evolves. Please refer to this link for more info -
http://developer.android.com/guide/practices/screens_support.html#DeclaringTabletLayouts Thank you.