You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you want to use "switch.isChecked" boolean in a listener you can use @JobGetabu and wrap the switch in a ViewGroup so that you can use "switch.isChecked" in it's listener like this
switch.setOnTouchListener { _, event ->
if (event.action == MotionEvent.ACTION_UP) {
switchWrapper.performClick()
true
}
switchWrapper.setOnClickListener {
val newSwitchStatus = status.isChecked().not()
if (newSwitchStatus)
// Do what you want
status.isChecked() = newSwitchStatus
}
@OverRide
public final void setOnClickListener(OnClickListener l) {}
can you please add its implementation
The text was updated successfully, but these errors were encountered: