jeudi 11 octobre 2018

Android : Create Custom CheckBox programmatically only

I want to create a checkbox with customizable corner radius and custom checkmark color. The challenge is : I cannot use the selector in XML as it is going to be part of a library. If I extend the CheckBox class and use DrawableGradient then I am not able to get rid of the android checkbox inside the Drawable. If I extend the View class then I have to completely re-write the checkbox implementation.

Is there a way to add the checkmark image drawable on top of the CheckBox?




Aucun commentaire:

Enregistrer un commentaire