Skip to content

Latest commit

 

History

History
68 lines (38 loc) · 1.38 KB

File metadata and controls

68 lines (38 loc) · 1.38 KB

Android Arsenal

android-selector-intellij-plugin

🎨 Generate selectors for background drawable.

Usage

  • Set your colors.
    <color name="colorPrimary">#519FE5</color>
    <color name="colorPrimaryDark">#388AC6</color>
    <color name="colorAccent">#FFFFFF</color>
  • Select New -> Android Selector with your res directory.

screenshot1

  • Set filename, color, pressed and pressed-v21.

screenshot2

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 <=
demo1 demo2

Dependency

  • com.android.support:appcompat-v7:22.+

License

MIT © Jaewe Heo