Can the Android drawable directory contain subdirectories?

后端 未结 21 1223
醉梦人生
醉梦人生 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:40

    It is possible to have multiple drawable folders by having an extra folder parallel to 'res' with a subdirectory 'drawable' and then add following to gradle:

    sourceSets {
        main {
            res.srcDirs 'src/main/'
        }
    }
    

    Tested with gradle 6.5.1

提交回复
热议问题