importre / Android Selector Intellij Plugin
Licence: mit
🎨 Generate selectors for background drawable
Stars: ✭ 309
Programming Languages
java
68154 projects - #9 most used programming language
android-selector-intellij-plugin
🎨 Generate selectors for background drawable.
You can use colorButtonNormal
simply,
but make easily touch feedback of normal View
s as well as Button
s with this plugin.
Installation
- open Android Studio(or IntelliJ)
- Preferences ➡️ Plugins ➡️ Browse Repositories
- Search "Android Selector"
- Click "Install Plugin" button
Usage
- Set your colors(in
res/values/colors.xml
).
<color name="colorPrimary">#519FE5</color>
<color name="colorPrimaryDark">#388AC6</color>
<color name="colorAccent">#FFFFFF</color>
- Select
New -> Android Selector(or Ctrl/Cmd + N)
on yourres
directory.
- Select filename, color, pressed and pressed-v21 respectively.
ripple drawable is generated in drawable-v21 directory.
normal drawable is generated in drawable directory.
- Use the drawable.
<android.support.v7.widget.AppCompatButton
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="16dp"
android:background="@drawable/<GENERATED_DRAWABLE>"
android:gravity="center"
android:minWidth="100dp"
android:text="pressed" />
Demo
Lollipop > | Lollipop <= |
---|---|
Dependency
- com.android.support:appcompat-v7:22.+
License
MIT © Jaewe Heo
Note that the project description data, including the texts, logos, images, and/or trademarks,
for each open source project belongs to its rightful owner.
If you wish to add or remove any projects, please contact us at [email protected].