Home

Awesome

SelectorChapek for Android

This Android Studio plugin automatically generates drawable selectors from appropriately named Android resources.

How to install it:

or

How to use it:

  1. Right-click folder with your resources e.g 'drawable-xhdpi'

  1. Select 'Generate Android Selectors'

  1. 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 suffixDrawable state
_normal(default state)
_pressedstate_pressed
_focusedstate_focused
_disabledstate_enabled (false)
_checkedstate_checked
_selectedstate_selected
_hoveredstate_hovered
_checkablestate_checkable
_activatedstate_activated
_windowfocusedstate_window_focused

Wishlist

Pull requests are welcomed!

Why 'Chapek'?

<img src="http://upload.wikimedia.org/wikipedia/commons/b/bd/Karel-capek.jpg" width="60" align="right"/>

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.