如何在Android studio中的drawable文件夹中创建XML文件?

问题描述:

我正在关注一个在eclipse中完成的教程,但我正在使用Android工作室。

教程中有一个XML文件的创建,它将被放置在drawable文件夹中项目中的资源。

当我尝试在drawable文件夹中创建上述文件时,它会自动切换到values文件夹。

我怎么能让它成为可能该文件将保留在drawable文件夹中?

I am following a tutorial which is done in eclipse, but i am working on Android studio.
There is a creation of XML file for values in the tutorial which is to be placed in drawable folder of resources in the project.
When I try to create the above said file in the drawable folder, it automatically shifts to values folder.
How can i make it possible that the file will remain in the drawable folder?

不确定你到底想要做什么。但似乎你在尝试创建包含值的xml文件drawable文件夹。可绘制文件夹是用于保存屏幕所需图像的特殊文件夹。但它也允许将XML文件放在里面。一种这样的场景是塑造按钮(例如圆形/弯曲按钮设计)。如果您要检查类似的东西那么



右键单击 Drawable文件夹 - >新 - >可绘制资源文件,将在Drawable文件夹中创建一个XML文件。



如果有其他意图,请在问题中提及。
Not sure what exactly you where trying to do.But seems that you were trying to create xml file which contains values in the drawable folder. Drawable folders are special folders intended to hold the Images needed for the screens. But it also allows XML files to be placed inside. One such scenario is shaping the buttons ( example rounded/curved button design) . If something similar was you checking for then

Right Click on Drawable folder -> New -> Drawable Resource File , will create a XML file inside the Drawable folder.

If intended something else , please mention that in the question.