Android different size image issue -
i had 4 background images:
(240*320, 320*480, 480*720, 640*960)
now problem had samsung galaxy tab 2 takes image hdpi meaning image size 480*720 , tab size 640*1024. image stretches. confused in image setting in device please of have idea please me.
create drawable-sw600dp-hdpi folder in res , put file folder
example
deprecated
- drawable-hdpi
- drawable-mdpi
- drawable-nodpi
- drawable-xhdpi
new technique configuration examples
- drawable-sw320dp -> 320dp: typical phone screen (240x320 ldpi, 320x480 mdpi, 480x800 hdpi, etc).
- drawable-sw480dp -> 480dp: tweener tablet streak (480x800 mdpi).
- drawable-sw600dp -> 600dp: 7” tablet (600x1024 mdpi).
- drawable-sw720dp -> 720dp: 10” tablet (720x1280 mdpi, 800x1280 mdpi, etc).
provide different layouts different screen sizes
the configuration qualifiers can use provide size-specific resources small, normal, large, , xlarge. example, layouts large screen should go in layout-xlarge/.
beginning android 3.2 (api level 13), above size groups deprecated , should instead use sw<n>dp configuration qualifier define smallest available width required layout resources. example, if multi-pane tablet layout requires @ least 600dp of screen width, should place in layout-sw600dp/.
using new techniques declaring layout resources discussed further in section declaring tablet layouts android 3.2.
Comments
Post a Comment