bug on android below 5.0
when i testing on samsung s4 , my app crash by your lib
my log :
com.llollox.androidtoggleswitch.widgets.BaseToggleSwitch.setElevation(BaseToggleSwitch.kt:272)
at com.llollox.androidtoggleswitch.widgets.BaseToggleSwitch.a(BaseToggleSwitch.kt:368)
at com.llollox.androidtoggleswitch.widgets.BaseToggleSwitch.setEntries(BaseToggleSwitch.kt:335)
at com.llollox.androidtoggleswitch.widgets.BaseToggleSwitch.
i fixed with java :
public class ToggleSwitchJava extends ToggleSwitch {
public ToggleSwitchJava(@NotNull Context context, @Nullable AttributeSet attrs) {
super(context, attrs);
}
@Override
public void setElevation(float elevation) {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP)
super.setElevation(elevation);
else ViewCompat.setElevation(this,elevation);
}
} you need update your lib to fixed problem
please update! I got the error also with android pre-lollipop
I have the same issue. This fix would be very much appreciated.
Any plans to merge this?