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

Allow setting item label via string resource #42

Merged
merged 2 commits into from
Apr 15, 2019
Merged

Allow setting item label via string resource #42

merged 2 commits into from
Apr 15, 2019

Conversation

Tunous
Copy link
Contributor

@Tunous Tunous commented Apr 13, 2019

This pull request adds a way to set item labels by using string resources instead of regular strings.

Example:

val popupMenu = popupMenu {
    section {
        item {
            labelRes = R.string.copy
        }
    }
}

@zawadz88
Copy link
Owner

Hi @Tunous,
Thanks for dropping this PR (and the other one)!
I'll review it shortly :)

Copy link
Owner

@zawadz88 zawadz88 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just this one change and this can merged :)
I'll review your other PRs and once they're merged I'll prepare a new release.
Thanks for contributing!

@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="copy">Copy</string>
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is used in the sample app only so it shouldn't be in the library.
Could you move it to sample/src/main/res/values/strings.xml instead, please?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

@zawadz88 zawadz88 added this to the 3.3.0 milestone Apr 15, 2019
@Tunous
Copy link
Contributor Author

Tunous commented Apr 15, 2019

I'll review your other PRs and once they're merged I'll prepare a new release.

Cool, but you don't have to be too quick with that. I think I'll want to make at least one more pull request. (For customizable max height/width, unless that's already possible. Not sure if there'll be anything else.)

@zawadz88 zawadz88 merged commit db7400f into zawadz88:master Apr 15, 2019
@Tunous Tunous deleted the feature/item-label-res branch April 15, 2019 15:20
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.

2 participants