Skip to content

Commit

Permalink
fix tint color setting in cardfield
Browse files Browse the repository at this point in the history
  • Loading branch information
charliecruzan-stripe committed Jan 31, 2024
1 parent 41de3de commit eaf49be
Showing 1 changed file with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -167,10 +167,11 @@ class CardFieldView(context: ThemedReactContext) : FrameLayout(context) {

private fun setCardBrandTint(color: Int) {
try {
cardInputWidgetBinding.cardBrandView::class.java.getDeclaredField("tintColorInt").let { internalTintColor ->
internalTintColor.isAccessible = true
internalTintColor.set(cardInputWidgetBinding.cardBrandView, color)
}
cardInputWidgetBinding.cardBrandView::class.java
.getDeclaredMethod("setTintColorInt\$payments_core_release", Int::class.java)
.let {
it(cardInputWidgetBinding.cardBrandView, color)
}
} catch (e: Exception) {
Log.e(
"StripeReactNative",
Expand Down

0 comments on commit eaf49be

Please # to comment.