简体   繁体   English

如何在intelij IDEA中将可绘制对象添加到我的res文件夹中?

[英]How can I add drawables to my res folder in intelij IDEA?

I am new to intelij IDEA. 我是intelij IDEA的新手。 I have just discovered that there is no drawables folder in my res folder. 我刚刚发现res文件夹中没有drawables文件夹。 Do the drawables come automatically or you just have to add it by yourself?If so how it is been done? 可绘制对象是自动生成的还是只需要您自己添加即可? I will appreciate your response. 感谢您的答复。

Just drag and drop the image from the source folder to idea res/drawable package. 只需将图像从源文件夹拖放到idea res / drawable包中即可。 I know for a fact it works for PNG image. 我知道事实上它适用于PNG图片。

In Android Studio you can press mouse right button on res folder and then go in new section and choose "Image Asset". 在Android Studio中,您可以在res文件夹上按鼠标右键,然后进入新部分并选择“ Image Asset”。 In it find "Asset Type" press on it and select "Action Bar and Tab Icons" then select your image path, write name for it and that's all. 在其中找到“资产类型”,然后按一下并选择“操作栏和选项卡图标”,然后选择图像路径,为其输入名称,仅此而已。 Although if you won't see it just select "Project" isteaad of Android in left Project menu 尽管如果您看不到它,只需在左侧“项目”菜单中选择Android的“ Project” isteaad

Right click on res folder: New -> Android resource directory . 右键单击res文件夹: 新建-> Android资源目录

Select resource type: drawable , change parameters as you wish, press OK . 选择资源类型: 可绘制 ,根据需要更改参数,然后按OK

Ready! 准备!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何将我的应用程序在res / raw文件夹中的自定义铃声添加到铃声首选项中 - How can I add my app's custom ringtones in res/raw folder to a ringtonepreference 我如何像在 Android Studio 中一样在 Intelij Idea 中找到构建变体? - How i can find Build variants in Intelij Idea as in Android Studio? Android/Eclipse:如何在 res/drawable 文件夹中添加图像? - Android/Eclipse: how can I add an image in the res/drawable folder? 如何从res / drawables文件夹存储图片路径? - How to store pictures paths from res/drawables folder? 我可以在“ res”文件夹中添加什么文件夹? - What all folder i can add in the 'res' folder? 如何保护我的 Android 应用程序 APK 的 ..res/raw/ 文件夹中的视频? - How can I protect videos in the ..res/raw/ folder of my Android app's APK? 如何将res文件夹添加到“ androidTest”? - How to add res folder to 'androidTest'? 如何在ubuntu 11.10中为android开发配置intelij想法? - how do i configure intelij idea for android development in ubuntu 11.10? 如何在我的Android项目中将来自/ res / values的xml文件添加到gitignore中? - How can I add a xml file from /res/values to my gitignore in my Android project? 如何将录制的文件存储在res文件夹中? - How can I store the recorded file inside the res folder?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM