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

when setOnClickListener is called the isOn state is opposite

Open kenargo opened this issue 5 years ago • 4 comments

If I use the setOnClickListener (which I prefer as it is more standard with the common widgets) the state of isOn reports the opposite of what the state is.

In other words, if the toggle is turning ON then when setOnClickListener is called the isOn state reports OFF. If the toggle is turning OFF then when setOnClickListener is called the isOn state reports ON.

kenargo avatar Jan 25 '19 06:01 kenargo

Hi @kenargo you can refer to my #25 , you will get correct behavior on set click listener

ch8n avatar Oct 26 '19 11:10 ch8n

Thanks

⁣Get BlueMail for Android ​

On Oct 26, 2019, 4:20 AM, at 4:20 AM, Chetan garg [email protected] wrote:

Hi @kenargo you can refer to my #25 , you will get correct behavior on set click listener

-- You are receiving this because you were mentioned. Reply to this email directly or view it on GitHub: https://github.com/Angads25/android-toggle/issues/22#issuecomment-546593831

kenargo avatar Oct 26 '19 17:10 kenargo

Are you planning to pull the changes into the master or only have them in the private branch?

From: Chetan garg [mailto:[email protected]] Sent: Saturday, October 26, 2019 4:20 AM To: Angads25/android-toggle [email protected] Cc: Kenneth A. Argo [email protected]; Mention [email protected] Subject: Re: [Angads25/android-toggle] when setOnClickListener is called the isOn state is opposite (#22)

Hi @kenargo https://github.com/kenargo you can refer to my #25 https://github.com/Angads25/android-toggle/pull/25 , you will get correct behavior on set click listener

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Angads25/android-toggle/issues/22?email_source=notifications&email_token=ADHP4OEGM6SCHGF2DQOGK2DQQQRUHA5CNFSM4GSJBVR2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOECKFYJY#issuecomment-546593831 , or unsubscribe https://github.com/notifications/unsubscribe-auth/ADHP4OH3P3DGW6N32XNYZVLQQQRUHANCNFSM4GSJBVRQ . https://github.com/notifications/beacon/ADHP4OGH2WT7HWNXRBTMEODQQQRUHA5CNFSM4GSJBVR2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOECKFYJY.gif

kenargo avatar Oct 28 '19 18:10 kenargo

@kenargo I have updated to code in master branch I needed to write test but I have a oneplus device and UI dumping for espresso test isnt working for it, also I'm not able to produce drag behaviour using roboeltric test, to the changes are not tested , but I have just manually checked for now, If you can write test would be great help! it upto @Angads25 to accept PR without test or not

ch8n avatar Oct 29 '19 05:10 ch8n