android-toggle
android-toggle copied to clipboard
refactored set functionality
Hi @Angads25, I did some refactoring with your touch event listener logic, now its also giving callback to onClick listener so if anyone using click listener to toggle, but instead the user made a drag motion on it, it will give a callback to onclick listener as well, I tried but couldn't create a test with robolectric of drag behavior.
I'm new to programing and i might be wrong but after this fix, isOn() always seems to return false. Like when trying to save the Switch state in pref manager like bellow: prefManager.setAlarmSwitchState(alarmSwitch.isOn())