📜  重复资源android studio - 任何代码示例

📅  最后修改于: 2022-03-11 14:58:27.297000             🧑  作者: Mango

代码示例1
That's because Android considers the following to be the same when you referenced the images in your layouts:

E:\Android\LED\app\src\main\res\drawable-hdpi\login_bg.png
E:\Android\LED\app\src\main\res\drawable-hdpi\login_bg.9.png
login_bg.9.png image tells Android that this image is a 9-patch image. Whereas, the other image, login_bg.png, is a normal image. But in terms of referencing the images, they are declared the same, as in the following examples.

Normal image:


Nine-patch image:


Note: There is no difference in terms of referencing the images from your /res/drawables directory of your Android project.