zcweng / SwitchButton

SwitchButton.An beautiful+lightweight+custom-style-easy switch widget for Android,minSdkVersion >= 11
https://github.com/zcweng/SwitchButton
MIT License
2.66k stars 415 forks source link

CANNOT use Databinding with attr: sb_checked #52

Open wangjingtian110 opened 2 years ago

wangjingtian110 commented 2 years ago

<com.suke.widget.SwitchButton android:layout_centerInParent="true" android:layout_width="45dp" android:layout_height="25dp" app:sb_checked="@={model.enable}" app:sb_checkline_color="@color/shiny_blue" app:sb_show_indicator="false" />

Cannot find a getter for that accepts parameter type 'java.lang.Boolean'

If a binding adapter provides the getter, check that the adapter is annotated correctly and that the parameter type matches. Open File

Highly recommand to add databinding support!

developmans commented 2 years ago

已收到!