ACheckBox

Additional

Language
Java
Version
N/A
Created
Aug 13, 2016
Updated
Aug 24, 2016 (Retired)
Owner
Wallace (Lswks)
Contributor
Wallace (Lswks)
1
Activity
Badge
Generate
Download
Source code
APK file

Show card

ACheckBox

This is a simple CheckBox for Android with cool animation.

Import to your project

Gradle

compile 'com.bigmercu.cBox:cbox:1.08'

Maven

in build.gradle of your project

allprojects {
    repositories {
        jcenter()
        maven {
            url 'https://dl.bintray.com/bigmercu/maven/'
        }
    }
}
...

in build.gradle of your Module

dependencies {
  ...
    compile 'com.bigmercu.cBox:cbox:1.08'
}

Attrs

|attr|format| |---|:---|:---:| |stroke_width|dimension| |color_before|color| |color_after|color| |check_text|string| |check_style|fork/hook| |show_border|boolean| |is_circle_border|boolean|

Usage

In Layout File

<com.bigmercu.cBox.CheckBox
        android:padding="5dp"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        app:check_text="算法"
        app:show_border="true"
        app:color_after="@color/colorAccent"
        app:color_before="@color/colorPrimary"
        app:check_style="hook"
        app:is_circle_border="true"/>

In Java File

        mCheckBox.setChecked(boolean);
        mCheckBox.setOnCheckedChangeListener(new CheckBox..OnCheckedChangeListener() {
            @Override
            public void onChange(boolean checked) {
            }
        });
        mCheckBox.isChecked()