What is the best way to create drawables for different dpi

前端 未结 8 1267
难免孤独
难免孤独 2020-12-11 05:13

Do you create the MDPI drawable first and just scale it accordinly to the .075/1.00/1.50/2 ratio by pixels in photoshop or do you recreate each individual drawable?

8条回答
  •  半阙折子戏
    2020-12-11 06:10

    Looks like there's a tool in Android Studio:

    Expand your project folder in the Project View > right click on app > New > Image Asset

    Icon Type: Action Bar and Tab Icons

    Asset Type: Image

    Choose the Path for original image (it should be big)

    Shape: None (to make background transparent)

    And it will generate the images in the appropriate drawable folders.

提交回复
热议问题