项目
在 GitHub 查看

inmite/android-selector-chapek
关于
可根据规范命名的资源自动生成 drawable 选择器的 Android Studio 插件。
学习与教育实测星标增长
- 24小时
- 0
- 7天
- 0
- 15天
- 0
- 1个月
- -2
各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。
README.md
原文SelectorChapek for Android
This Android Studio plugin automatically generates drawable selectors from appropriately named Android resources.
How to install it:
- in Android Studio: go to
Preferences→Plugins→Browse repositoriesand search forSelectorChapek
or
- download it and install via
Preferences→Plugins→Install plugin from disk
How to use it:
- Right-click folder with your resources e.g 'drawable-xhdpi'

- Select 'Generate Android Selectors'

- All selectors automagically appear in the 'drawable' folder!

Naming convention:
In order of plugin to work, resources need to be appropriately named. The plugin supports png or nine-patch files with certain suffices anywhere in the file name. You can also combine any suffixes together.
Mapping
| File name suffix | Drawable state |
|---|---|
| _normal | (default state) |
| _pressed | state_pressed |
| _focused | state_focused |
| _disabled | state_enabled (false) |
| _checked | state_checked |
| _selected | state_selected |
| _hovered | state_hovered |
| _checkable | state_checkable |
| _activated | state_activated |
| _windowfocused | state_window_focused |
Wishlist
- UI which will tell you which selectors will be generated
- possibility to change naming mapping
Pull requests are welcomed!
Why 'Chapek'?

Karel Čapek was a famous Czech writer, inventor of the word 'robot'. The word comes from Czech word 'robota', which means 'hard manual labor'. As with Čapek's robots, this plugin will remove your unnecessary manual labor.
See our other Czech personalities who help with #AndroidDev.
探索相关项目
加载中…