android-color-button
Using Maven
ColorButton Library is pushed to Maven Central, so you just need to add the following dependency to your build.gradle
.
dependencies {
compile 'me.yuichi0301:cbutton:1.0.6'
}
Usage
via xml (sample)
<me.yuichi0301.widget.ColorButton
android:layout_marginTop="10dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/hello_world"
android:textColor="#fff"
custom:backgroundColor="#f00" />
via code (sample)
ColorButton cbutton = new ColorButton(getApplicationContext());
cbutton.setStyle(7, Color.GREEN);