您的位置:首页 > 技术中心 > 软件教程 >

Android Studio新建selector的xml文件的方法步骤

时间:2022-10-26 18:44

      最近不少伙伴咨询Android Studio如何新建selector的xml文件.的操作,今天小编就带来了Android Studio新建selector的xml文件的操作步骤,感兴趣的小伙伴一起来看看吧!

      Android Studio新建selector的xml文件的方法步骤

Android Studio新建selector的xml文件的方法步骤

      方法一:该方法既能在Android模式下进行,也可以在project模式下进行

Android Studio新建selector的xml文件的方法步骤截图

      右击将新建的xml 文件的module,选择Android resource file

Android Studio新建selector的xml文件的方法步骤截图

      在弹出的界面中,将Resource type 修改为Drawable

Android Studio新建selector的xml文件的方法步骤截图

      方法二:但这个必须是在project模式下的

Android Studio新建selector的xml文件的方法步骤截图

      找到需新建xml 的module 下的drawable文件,在此目录下右击drawable,选择Drawable resource file,具体路径为app-->src-->res-->drawable,右击操作顺序为 New-->Drawable resource file

Android Studio新建selector的xml文件的方法步骤截图

      在弹出的页面直接新建即可。

Android Studio新建selector的xml文件的方法步骤截图

      上文就讲解了Android Studio新建selector的xml文件的方法,希望有需要的朋友都来学习哦。

热门排行

今日推荐

热门手游