了解android drawable文件夹 [英] understanding android drawable folders

查看:65
本文介绍了了解android drawable文件夹的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,



我是Android开发的新手,到目前为止我很享受学习。



我理解followind drawable文件夹用于存储不同设备的图形图像png,位图,jpg等,因为屏幕尺寸不同:



res / drawable-mdpi ,drawable-hdpi,drawable-xhdpi,drawable-xxhdpi



然而令我困惑的是,很多在线教程都建议我创建一个可绘制的文件夹,其中我将存储XML文件,即list_selector.xml



我是否正确地假设他们要我在res目录中创建drawable文件夹?



如果有人能确认,我将不胜感激



谢谢

Hi there,

I am new to Android development and am enjoying learning thus far.

I understand the followind drawable folders are used to store graphic images png,bitmap, jpg etc for different devices due to the differing screen size:

res/drawable-mdpi, drawable-hdpi, drawable-xhdpi, drawable-xxhdpi

However what is confusing me is that alot of online tutorials advise me to "create a drawable folder" in which I will store XML files i.e. list_selector.xml

Am I correct in assuming they want me to create the "drawable" folder in my "res" directory?

I'd be grateful if anyone could confirm

Thank you

推荐答案

这是正确的,你应该创建一个drawable文件夹,它对于存储独立于分辨率的drawable是很有用的,所以像基于XML的选择器和背景这样的东西。



你认为它应该是/ res / drawable是正确的。
That is correct, you are expected to create a drawable folder which is useful for storing resolution independent drawables, so things like XML based selectors and backgrounds.

You are correct in assuming that it should be /res/drawable.


这篇关于了解android drawable文件夹的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆