Skip to content

sharukhrs/android-custom-checkbox

 
 

Repository files navigation

Android Custom CheckBox

Android custom checkbox based on SmoothCheckBox

compile 'net.igenius:customcheckbox:1.3'

Attrs

Attr Type Description
duration integer Animation Duration
stroke_width dimension The border width when unchecked
color_tick color Tick color (visible only when checked)
color_checked color Fill color when selected
color_unchecked color Fill color when unchecked
color_unchecked_stroke color Border color when unchecked

Sample Usage

setChecked(boolean checked); //by default, it's wthout animation
setChecked(boolean checked, boolean animate);  //pass true to animate
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_sample);

    final CustomCheckBox scb = (CustomCheckBox) findViewById(R.id.scb);
    scb.setOnCheckedChangeListener(new CustomCheckBox.OnCheckedChangeListener() {
        @Override
        public void onCheckedChanged(CustomCheckBox checkBox, boolean isChecked) {
            Log.d("CustomCheckBox", String.valueOf(isChecked));
        }
    });
}

Publishing

To publish on bintray, simply execute: ./gradlew clean assembleRelease bintrayUpload

About

Custom checkbox implementation for Android

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 100.0%