Can the Android drawable directory contain subdirectories?

后端 未结 21 1213
醉梦人生
醉梦人生 2020-11-22 04:13

In the Android SDK documentation, all of the examples used with the @drawable/my_image xml syntax directly address images that are stored in the res/drawable directory in my

21条回答
  •  南方客
    南方客 (楼主)
    2020-11-22 04:41

    1. Right click on Drawable
    2. Select New ---> Directory
    3. Enter the directory name. Eg: logo.png(the location will already show the drawable folder by default)
    4. Copy and paste the images directly into the drawable folder. While pasting you get an option to choose mdpi/xhdpi/xxhdpi etc for each of the images from a list. Select the appropriate option and enter the name of the image. Make sure to keep the same name as the directory name i.e logo.png
    5. Do the same for the remaining images. All of them will be placed under the logo.png main folder.

提交回复
热议问题