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

  1. drawable-hdpi
  2. drawable-mdpi
  3. drawable-nodpi
  4. drawable-xhdpi

new technique configuration examples

  1. drawable-sw320dp -> 320dp: typical phone screen (240x320 ldpi, 320x480 mdpi, 480x800 hdpi, etc).
  2. drawable-sw480dp -> 480dp: tweener tablet streak (480x800 mdpi).
  3. drawable-sw600dp -> 600dp: 7” tablet (600x1024 mdpi).
  4. 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.

supporting multiple screens


Comments

Popular posts from this blog

javascript - Count length of each class -

What design pattern is this code in Javascript? -

hadoop - Restrict secondarynamenode to be installed and run on any other node in the cluster -