image size (drawable-hdpi/ldpi/mdpi/xhdpi)

后端 未结 9 1799
逝去的感伤
逝去的感伤 2020-11-28 17:32

Study android, now I\'ve some images to put into drawable dirs (hdpi/ldpi/mdpi/xhdpi). I read a lot but again I don\'t understand. Which size should be an image for every di

相关标签:
9条回答
  • 2020-11-28 18:33

    See the image for reference :- (Soruce :- Android Studio-Image Assets option and Android Office Site )

    0 讨论(0)
  • 2020-11-28 18:33

    Tablets supports tvdpi and for that scaling factor is 1.33 times dimensions of medium dpi

        ldpi | mdpi | tvdpi | hdpi | xhdpi | xxhdpi | xxxhdpi
        0.75 | 1    | 1.33  | 1.5  | 2     | 3      | 4
    

    This means that if you generate a 400x400 image for xxxhdpi devices, you should generate the same resource in 300x300 for xxhdpi, 200x200 for xhdpi, 133x133 for tvdpi, 150x150 for hdpi, 100x100 for mdpi, and 75x75 for ldpi devices

    0 讨论(0)
  • 2020-11-28 18:36

    you can use Android Asset in android studio , and android Asset will give you image in this size as a drawable and the application will automatically use the size based on screen of device or emulate

    0 讨论(0)
提交回复
热议问题