addisonElliott / SegmentedButton

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

Adding property `selectedTextStyle` #28

Closed alexkok closed 4 years ago

alexkok commented 4 years ago

Adding a property to define the text style to use when the button is in its selected state.


Hello,

Thanks for continuing the older repo. With the many configuration options this component is great to customise!

While using this library, I was missing an option that I need: defining the text style for the selected button. So added this option to the library.


This Pull Request provides the option selectedTextStyle to the SegmentedButton:

addisonElliott commented 4 years ago

Hello, thanks for the contribution! It all looks good to me.

Do you mind adding an example demonstrating this capability? If you're comfortable with it, you can even include the exact setup you're using in code just to see some real-world usages.

If not, I can merge without an example.

alexkok commented 4 years ago

Thanks! As for the example, I've added it to the showcase of the Draggable Segmented Group in the sample app. The selected button of that row state gets the bold text on that set of buttons.

addisonElliott commented 4 years ago

Okay, works for me. I missed that the first time reading through the code.

Thanks for the contribution and sorry for the delay in merging it.

alexkok commented 4 years ago

No problem, thanks for merging and releasing it! 👍