android-toggle icon indicating copy to clipboard operation
android-toggle copied to clipboard

refactored set functionality

Open ch8n opened this issue 6 years ago • 1 comments

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.

ch8n avatar Oct 26 '19 11:10 ch8n

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())

dCosminn avatar Jul 25 '20 21:07 dCosminn