-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Fixed buttons that are blocked too long #6098
Conversation
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.
Really like the way this is done. I'll mark this as "needs testing" now as I've only requested a couple of tweaks that won't change behaviour.
defStyleAttr | ||
) | ||
init { | ||
context.theme.obtainStyledAttributes( |
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.
Could we add a helper to ContextUtils
for grabbing theme string theme attributes like this?
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.
Actually, kotlin offers an extension function called withStyledAttributes
so we can use it ffa8c79
4c23035
to
7dedf2a
Compare
7dedf2a
to
331b2ab
Compare
Tested with Success! Verified on device with Android 12,13 Verified cases:
|
Tested with Success! Verified on device with Android 10 |
Tested with Success! Verified on device with Android 11 |
Closes #6061
Why is this the best possible solution? Were any other approaches considered?
As discussed in the issue there are two approaches we can use depending on our needs:
MultiClickSafeMaterialButton
if we have multiple buttons on one screen and we don't want to block them. Here a good example is the navigation buttons or the control buttons that we use to select/unselect/delete forms.How does this change affect users? Describe intentional changes to behavior and behavior that could have accidentally been affected by code changes. In other words, what are the regression risks?
This should fix the problem with the navigation buttons and the buttons that control lists of forms (select/unselect/delete). Nothing else should be affected. It's possible that other places in the app might need similar changes but we can identify them later and file separate issues.
Do we need any specific form for testing your changes? If so, please attach one.
No.
Does this change require updates to documentation? If so, please file an issue here and include the link below.
No.
Before submitting this PR, please make sure you have:
./gradlew connectedAndroidTest
(or./gradlew testLab
) and confirmed all checks still pass