Closed ka05 closed 5 years ago
Just created a pull request: https://github.com/RobertApikyan/SegmentedControl/pull/17
Adding listeners in the onCreateViewHolder method (or in the ViewHolder's constructor ) will be more preferable, instead of adding them in the onBindViewHolder method. This approach will solve the problem, however using the remove method also will do the job.
Thanks for contribution, the remove methods are added in the latest release 'com.github.RobertApikyan:SegmentedControl:1.1.0'
@RobertApikyan, thanks for merging the PR and making the update! Seems to be working appropriately now, much apreciated
I am using this control in a cell in a recycler view for use in a form. There are duplicated calls occurring since the listener is added and never removed. I will create a pull request.