Closed smae1993 closed 5 years ago
Me too. I'd also like to know how I can make it multi select.
it's a good idea, will add such a functionality most probably on this weekend
When can I please expect to use multi select function?
sorry for delay, will try to publish a new version till the end of day
Thanks for your kindness. Your library is very good! It would be better if we could get the values of the items selected from the list.
Here is the new version of segmented control that supports multi selection.
implementation 'com.github.RobertApikyan:SegmentedControl:1.2-alpha'
For enabling multi selection use setSupportedSelectionsCount(int) programmatically and supportedSelectionsCount attribute from XML (default value is 1). it works in following way, if supportedSelectionCount = 3, then maximum 3 items can be in selected state at the same time, when the new item is selected the oldest selection become unselected.
For now it's in alpha release, please let me know if any problems will occur
Thank you very much. I think it will help a lot.
Hi, When I use "segmented_control.notifyConfigIsChanged();", the follow exception happens. So I used try catch and no problem. This might help you to improve the source codes.
java.util.NoSuchElementException at java.util.LinkedList.getLast(LinkedList.java:257) W/System.err: at segmented_control.widget.custom.android.com.segmentedcontrol.SegmentedControlControllerComponent.getLastSelectedViewHolder(SegmentedControlControllerComponent.java:103) W/System.err: at segmented_control.widget.custom.android.com.segmentedcontrol.SegmentedControlControllerComponent.recreate(SegmentedControlControllerComponent.java:201) W/System.err: at segmented_control.widget.custom.android.com.segmentedcontrol.SegmentedControlControllerComponent.notifyConfigIsChanged(SegmentedControlControllerComponent.java:156) W/System.err: at segmented_control.widget.custom.android.com.segmentedcontrol.SegmentedControl.notifyConfigIsChanged(SegmentedControl.java:620)
Many thanks.
Hi, thanks for reporting the issue, now it's fixed, here is the new version's dependency implementation 'com.github.RobertApikyan:SegmentedControl:1.2.0.1-alpha'
Hi, I am closing the issue, if any problem will occur please fill free to reopen it
How can i make this project multi selectable?