ceryle / SegmentedButton

Segmented Control with animation for Android API 12+
Apache License 2.0
363 stars 97 forks source link

getPosition() on segmentedButtonGroup obj always return 0 #9

Closed AnuragRepaka closed 7 years ago

AnuragRepaka commented 7 years ago

Hi, used your library and it's great.

Used two segmented button's inside a segmented button group. In java class file, when i apply getposition() on object of segmented button group..always return 0, irrespective of second button selected in app. Please fix it.

And thanks once again

ceryle commented 7 years ago

Hi, Thanks for the kind words. I did the same thing as you do and getPosition method looks working. However, this problem can be encountered in older versions of the lib. Which version do you use? Current version is 'v1.1.9'. If it still continues, can you share your code? or you can try segmentedButtonGroup's listener method which is "setOnClickedButtonPosition()".

AnuragRepaka commented 7 years ago

Hi,

I was using version 'v1.1.7'. Updated to latest version 'v1.1.9' and solved the issue.

Thanks once again.