Fix inconsistent usage of relative attributes on card icon #1395
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Use relative drawable methods when retrieving and setting drawables in multiline widget.
Motivation
When updating stripe to newest version 8.7.0->10.3.0 credit card icon displayed on multiline widget became black by default in our app. I took a look on what caused the issue and figured out that this regression occurred on 8.7.0->9.0.0 update. The issue was introduced in 8dae459#diff-5877ed2e4c28b26a5719752e15b01b8f
Change would cause the card image to never be updated on rtl languages and
was causing issues with initial card image on ltr as tint was not
applied because of check in update drawable method:
Testing
Force RTL mode card image should change on
Create Card PaymentMethods
when entering new credit card number. When on LTR the default black image card is not reproducible because of additional focus change event (this is not occurring in our app) but can be observed with debugger the image card image will be black until focus change event.Screenshots