addisonElliott / SegmentedButton

Segmented Control/Button with animation for Android API 16+
Apache License 2.0
148 stars 39 forks source link

Selector with bordered radius #4

Closed vinzaceto closed 5 years ago

vinzaceto commented 5 years ago

In the base code there is a sample with a selector having bordered radius. Is it possible to implement this feature? At this moment the selector has rectangular shape

addisonElliott commented 5 years ago

The screenshots on the README are from the old library, but I did implement all features from the old library in this library.

So yes, you should be able to. Let me know if you are having trouble and I'll test it on my end.

Edit: Okay, I lied after looking at the code closely. If you run my examples, you can see that I don't have the last one shown on the README, probably because I never got around to having rounded edges on the selected part.

As always, PRs are welcome if you're interested in tackling this issue. The code will be similar to how the edges & border is rounded for the left-most and right-most button in the group. See here: https://github.com/addisonElliott/SegmentedButton/blob/master/library/src/main/java/com/addisonelliott/segmentedbutton/SegmentedButton.java#L768

However, if you're not interested in doing a PR, I'll work on it this weekend and try to get the feature released.

Do you have a screenshot/sample I can go off of and to add to the sample app?

addisonElliott commented 5 years ago

Going to spend this weekend working on the PR. If you have a screenshot/sample I can go off of, that would be helpful.

addisonElliott commented 5 years ago

Functionality added for rounded corners on the selected button as well as a border.

Please upgrade to v3.1.1.

Note: app:background was switched to android:background in v3.1.1.