Android:可绘制 XML
这似乎是一个愚蠢的问题,但我正在遵循 Android 菜单指南;
这里是链接
我是否必须在res下创建一个drawable文件夹?在文件夹内我放置了名称为的图片; ic_new_game ic_帮助
?非常感谢帮助!
This might seem a stupid question, but I am following the Android guide on Menus;
Here is the link
Do I have to create a drawable folder under res? And inside the folder I put the pictures with name of;
ic_new_game
ic_help
? Help is much appreciated!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
你拥有的任何图像都应该放在 res/drawable 中。因此,请在 res 目录中创建可绘制文件夹,并将所有图像放在那里。
Any images you have should go in res/drawable. So make the folder drawable in your res directory and put all of your images there.
从教程中,
game_menu.xml:进入 res/menu/
ic_new_game 进入 res/drawable
From the tutorial,
the game_menu.xml: goes into res/menu/
The ic_new_game goes into res/drawable
我基本上是在祝福的答案中添加内容。以下是一些可以帮助您的屏幕截图。如果您使用 Eclipse,那么一旦您创建了 Android 项目,它应该会自动包含“项目层次结构”屏幕截图中描述的文件夹。另外,我决定将图像放入 mdpi(中密度)文件夹中。根据您尝试支持的密度,您可以选择分别将图像添加到 ldpi 和 hdpi 文件夹。希望这有帮助!
I am basically adding to blessenm's answer. Here are a few screenshots that will help you. If you are working on Eclipse, then once you create an Android project, it should automatically contain the folders depicted in the 'project hierarchy' screenshot. Also, I decided to put the images in the mdpi (medium density) folder. Depending on the densities you are trying to support, you may choose to add images to the ldpi and hdpi folders respectively. Hope this helps!