-
Notifications
You must be signed in to change notification settings - Fork 246
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 modification of Questionnaire submit action button text via configuration #2319
Conversation
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
datacapture/src/test/java/com/google/android/fhir/datacapture/QuestionnaireFragmentTest.kt
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@santosh-pingle @MJ1998 could you help me resolve the Kokoro check and maybe point out anything else I need to close on this? |
@DebbieArita |
@santosh-pingle @MJ1998 could you help me resolve the Kokoro check and maybe point out anything else I need to close on this?
Alright, thank you. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please try to add this line:
<string name="submit_questionnaire">New Submit String</string>
to the resource files in your app, and I think it'll override the string value in the library resources.
and if you really need to do this at run-time (which I'm not too keen on actually), you can do it this way: https://blog.kiprosh.com/how-to-replace-strings-xml-dynamically-in-android/
Please try this and see if this works better for you. My concern here is that if we provide an API / configuration for each string we'll end up with a ton of new API surfaces... and I worry that we'll struggle to manage.
@jingtang10 Changing the text via the cc @DebbieArita |
I missed reading this part of your comment @jingtang10. We only required the update for the questionnaire submission text. We'll try the suggestion. From the reference shared I do not think this will address a scenario where we would want to use 2 different texts for a questionnaire submission text. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i think this change alone is fine. but let's be careful with introducing too many arguments in the future.
…figuration (google#2319) * Allow modification of Questionnaire submit action button text via configuration * Run spotlessApply * Update test to check that button text is editable * Update test to check that button text is editable * 🎨 Apply Spotless formatting * Empty commit * Resolve merge conflicts --------- Co-authored-by: Allan Onchuru <a.onchuru@gmail.com> Co-authored-by: Francis Odhiambo <4540684+f-odhiambo@users.noreply.github.com> Co-authored-by: Benjamin Mwalimu <dubdabasoduba@gmail.com> Co-authored-by: Allan Onchuru <16164649+allan-on@users.noreply.github.com>
…figuration
IMPORTANT: All PRs must be linked to an issue (except for extremely trivial and straightforward changes).
Fixes #2239
Description
Clear and concise code change description.
Alternative(s) considered
Have you considered any alternatives? And if so, why have you chosen the approach in this PR?
Type
Choose one: (Bug fix | Feature | Documentation | Testing | Code health | Builds | Releases | Other)
Screenshots (if applicable)
Checklist
./gradlew spotlessApply
and./gradlew spotlessCheck
to check my code follows the style guide of this project../gradlew check
and./gradlew connectedCheck
to test my changes locally.