From d5c6d13d9d13204eb2d381316351adc8eb3903f6 Mon Sep 17 00:00:00 2001 From: Michael Shafrir Date: Thu, 28 Feb 2019 10:49:42 -0500 Subject: [PATCH] Fix TalkBack crash in CardInputWidget **Summary** `android:accessibilityTraversalAfter` on both the expiration date and CVC input views were pointing to the wrong views. **Testing** On a Google Pixel, confirmed that TalkBack is no longer crashing when navigating through the input views of CardInputWidget. **Motivation** Fixes #682 --- stripe/res/layout/card_input_widget.xml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/stripe/res/layout/card_input_widget.xml b/stripe/res/layout/card_input_widget.xml index 9cbf7741ddc..f69b054e5a4 100644 --- a/stripe/res/layout/card_input_widget.xml +++ b/stripe/res/layout/card_input_widget.xml @@ -83,8 +83,8 @@ android:hint="@string/expiry_date_hint" tools:ignore="UnusedAttribute" tools:importantForAccessibility="yes" - android:accessibilityTraversalAfter="@+id/et_expiry_date" android:accessibilityTraversalBefore="@id/et_card_number" + android:accessibilityTraversalAfter="@+id/et_cvc_number" android:nextFocusRight="@+id/et_cvc_number" android:nextFocusForward="@+id/et_cvc_number" android:nextFocusDown="@+id/et_cvc_number" @@ -107,7 +107,6 @@ android:layout_height="wrap_content" tools:ignore="UnusedAttribute" tools:importantForAccessibility="yes" - android:accessibilityTraversalAfter="@+id/et_expiry_date" android:nextFocusLeft="@id/et_expiry_date" android:nextFocusUp="@id/et_expiry_date" android:background="@android:color/transparent"