當前位置:
首頁 >
AS插件-android-selector-chapek
發布時間:2025/3/21
44
豆豆
生活随笔
收集整理的這篇文章主要介紹了
AS插件-android-selector-chapek
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
概述
生成Selector的插件。
只需要在drawable文件夾中右鍵,在彈出的菜單中選擇Generate Android Selectors,會自動的根據你的幾個drawable文件夾里的資源的命名,幫你生成Selector代碼。
當然了,你的資源文件需要根據約定的后綴來命名。比如按下狀態為_pressed,正常狀態為_normal,不可用狀態為_disable,等等。
下載安裝
詳細的使用請查看android-selector-chapek
兩種安裝途徑:
in Android Studio: go to Preferences→Plugins→Browse repositories and search for SelectorChapek
download it and install via Preferences→Plugins→Install plugin from disk
使用
1) Right-click folder with your resources e.g ‘drawable-xhdpi’
2) Select ‘Generate Android Selectors’
3) All selectors automagically appear in the ‘drawable’ folder!
文件命名約定
總結
以上是生活随笔為你收集整理的AS插件-android-selector-chapek的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: AS插件-Android Parcela
- 下一篇: AS主题+配置备份+Logcat颜色配置