Skip to content

Commit

Permalink
Fix crash on Android 8 and 9 when opening the PaymentSheet (#3721)
Browse files Browse the repository at this point in the history
  • Loading branch information
michelleb-stripe authored May 13, 2021
1 parent 7cf96cd commit 387565d
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
2 changes: 2 additions & 0 deletions stripe/res/layout/fragment_paymentsheet_add_card.xml
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,8 @@
android:id="@+id/card_multiline_widget"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@android:color/white"
android:backgroundTint="@color/stripe_paymentsheet_elements_background_states"
app:shouldShowPostalCode="false" />
</com.google.android.material.card.MaterialCardView>

Expand Down
6 changes: 4 additions & 2 deletions stripe/res/values/styles.xml
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,8 @@
<item name="boxStrokeWidth">0dp</item>
<item name="android:paddingTop">4dp</item>
<item name="android:paddingBottom">4dp</item>
<item name="android:background">@color/stripe_paymentsheet_elements_background_states</item>
<item name="android:background">@android:color/white</item>
<item name="android:backgroundTint">@color/stripe_paymentsheet_elements_background_states</item>
<item name="android:textColorHint">@color/stripe_paymentsheet_textinputlayout_hint</item>
</style>

Expand All @@ -142,7 +143,8 @@
<item name="boxStrokeWidth">0dp</item>
<item name="android:paddingTop">4dp</item>
<item name="android:paddingBottom">4dp</item>
<item name="android:background">@color/stripe_paymentsheet_elements_background_states</item>
<item name="android:background">@android:color/white</item>
<item name="android:backgroundTint">@color/stripe_paymentsheet_elements_background_states</item>
</style>

<style name="StripePaymentSheetTextInputEditText">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,6 @@ internal abstract class BaseAddCardFragment(
cardMultilineWidget.setCvcPlaceholderText("")

cardMultilineWidget.cvcEditText.imeOptions = EditorInfo.IME_ACTION_NEXT
cardMultilineWidget.setBackgroundResource(R.color.stripe_paymentsheet_elements_background_states)

// add vertical divider between expiry date and CVC
cardMultilineWidget.secondRowLayout.addView(
Expand Down

0 comments on commit 387565d

Please sign in to comment.