Android Studio新建shape等xml文件

来源:互联网 发布:vb中chr是什么意思 编辑:程序博客网 时间:2024/06/08 11:19

在app下面的res/drawable右键new的时候是找不到shape类型的文件的(不得不说这一点还是eclipse好一点)
这里写图片描述

所以可以直接在NEW->FILE下面建立
这里写图片描述
这里写图片描述
注意:必须完整地加上后缀*.xml
之后点击ok就行了。
然后之后选择写上根元素是shape
之后Alt+Enter会自动加上xmlns:android=”http://schemas.android.com/apk/res/android”
这句话

<shape xmlns:android="http://schemas.android.com/apk/res/android">    //.......</shape>
0 1
原创粉丝点击