Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding property selectedTextStyle #28

Merged

Conversation

alexkok
Copy link
Contributor

@alexkok alexkok commented May 19, 2020

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:

  • The available typeface options are the same as the ones for the app:textStyle
  • By default, the selected text style is the text style as defined by the app:textStyle attribute.
  • Also added a getter and setter for this, since all properties provide it like this
  • Added the property to the README

@alexkok alexkok changed the title Added property selectedTextStyle Adding property selectedTextStyle May 19, 2020
@addisonElliott
Copy link
Owner

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
Copy link
Contributor Author

alexkok commented May 20, 2020

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
Copy link
Owner

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.

@addisonElliott addisonElliott merged commit 3889547 into addisonElliott:master May 20, 2020
@alexkok
Copy link
Contributor Author

alexkok commented May 25, 2020

No problem, thanks for merging and releasing it! 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants