From 936d9ee1d86072ae6876db112dd24cf2e38063e5 Mon Sep 17 00:00:00 2001 From: Michael Shafrir Date: Fri, 4 Oct 2019 10:38:06 -0400 Subject: [PATCH] Add namespace to Stripe resources Fixes #1656 --- .../res/layout/add_payment_method_footer.xml | 2 +- .../res/drawable/simple_button_background.xml | 2 +- .../res/layout/activity_payment_methods.xml | 4 +- .../activity_select_shipping_method.xml | 2 +- stripe/res/layout/activity_stripe.xml | 2 +- stripe/res/layout/add_address_widget.xml | 14 ++--- .../layout/add_payment_method_card_layout.xml | 2 +- .../layout/add_payment_method_card_row.xml | 14 ++--- .../layout/add_payment_method_fpx_layout.xml | 2 +- .../res/layout/add_payment_method_fpx_row.xml | 14 ++--- stripe/res/layout/card_input_widget.xml | 10 ++-- stripe/res/layout/card_multiline_widget.xml | 12 ++-- stripe/res/layout/fpx_bank.xml | 6 +- stripe/res/layout/masked_card_row.xml | 6 +- stripe/res/layout/masked_card_view.xml | 6 +- .../layout/payment_auth_web_view_layout.xml | 2 +- stripe/res/layout/shipping_method_view.xml | 10 ++-- stripe/res/values-night/colors.xml | 14 ++--- stripe/res/values/colors.xml | 28 +++++----- stripe/res/values/constants.xml | 4 +- stripe/res/values/dimens.xml | 56 +++++++++---------- stripe/res/values/ids.xml | 6 +- stripe/res/values/styles.xml | 14 ++--- .../view/AddPaymentMethodCardRowView.kt | 2 +- .../view/AddPaymentMethodFpxRowView.kt | 2 +- .../android/view/AddPaymentMethodFpxView.kt | 2 +- .../stripe/android/view/CardInputWidget.java | 4 +- .../android/view/CardMultilineWidget.java | 4 +- .../view/PaymentMethodSwipeCallback.kt | 6 +- .../stripe/android/view/ShippingMethodView.kt | 6 +- .../com/stripe/android/view/StripeEditText.kt | 4 +- .../com/stripe/android/view/ThemeConfig.kt | 10 ++-- .../android/view/CardMultilineWidgetTest.kt | 2 +- .../view/PaymentMethodSwipeCallbackTest.kt | 4 +- .../view/PaymentMethodsActivityTest.kt | 4 +- .../stripe/android/view/StripeEditTextTest.kt | 6 +- 36 files changed, 144 insertions(+), 144 deletions(-) diff --git a/example/res/layout/add_payment_method_footer.xml b/example/res/layout/add_payment_method_footer.xml index bf0c52839ef..b058a2bbb83 100644 --- a/example/res/layout/add_payment_method_footer.xml +++ b/example/res/layout/add_payment_method_footer.xml @@ -2,5 +2,5 @@ \ No newline at end of file diff --git a/stripe/res/drawable/simple_button_background.xml b/stripe/res/drawable/simple_button_background.xml index e261e50a822..5e7f5f2cfce 100644 --- a/stripe/res/drawable/simple_button_background.xml +++ b/stripe/res/drawable/simple_button_background.xml @@ -1,6 +1,6 @@ - diff --git a/stripe/res/layout/activity_payment_methods.xml b/stripe/res/layout/activity_payment_methods.xml index c6a7e37e8be..dc18cce84b4 100644 --- a/stripe/res/layout/activity_payment_methods.xml +++ b/stripe/res/layout/activity_payment_methods.xml @@ -15,7 +15,7 @@ android:layout_width="match_parent" android:layout_height="?attr/actionBarSize" android:background="?attr/colorPrimary" - android:elevation="@dimen/toolbar_elevation" + android:elevation="@dimen/stripe_toolbar_elevation" app:title="@string/title_payment_method" android:theme="@style/StripeToolBarStyle" /> @@ -33,7 +33,7 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_below="@id/payment_methods_toolbar" - android:layout_marginTop="@dimen/list_top_margin" /> + android:layout_marginTop="@dimen/stripe_list_top_margin" /> diff --git a/stripe/res/layout/activity_select_shipping_method.xml b/stripe/res/layout/activity_select_shipping_method.xml index 79e4e63bf30..e71ee6d55c3 100644 --- a/stripe/res/layout/activity_select_shipping_method.xml +++ b/stripe/res/layout/activity_select_shipping_method.xml @@ -9,6 +9,6 @@ android:id="@+id/select_shipping_method_widget" android:layout_width="match_parent" android:layout_height="wrap_content" - android:layout_margin="@dimen/shipping_widget_outer_margin" + android:layout_margin="@dimen/stripe_shipping_widget_outer_margin" /> diff --git a/stripe/res/layout/activity_stripe.xml b/stripe/res/layout/activity_stripe.xml index bc9badf33e8..bf4a3e0326b 100644 --- a/stripe/res/layout/activity_stripe.xml +++ b/stripe/res/layout/activity_stripe.xml @@ -12,7 +12,7 @@ android:layout_height="?attr/actionBarSize" android:layout_alignParentTop="true" android:background="?attr/colorPrimary" - android:elevation="@dimen/toolbar_elevation" + android:elevation="@dimen/stripe_toolbar_elevation" android:theme="@style/StripeToolBarStyle" /> diff --git a/stripe/res/layout/add_address_widget.xml b/stripe/res/layout/add_address_widget.xml index 912cd518625..79664eb6279 100644 --- a/stripe/res/layout/add_address_widget.xml +++ b/stripe/res/layout/add_address_widget.xml @@ -13,7 +13,7 @@ android:id="@+id/tl_name_aaw" android:layout_width="match_parent" android:layout_height="wrap_content" - android:layout_marginTop="@dimen/add_address_vertical_margin" + android:layout_marginTop="@dimen/stripe_add_address_vertical_margin" > diff --git a/stripe/res/layout/add_payment_method_card_layout.xml b/stripe/res/layout/add_payment_method_card_layout.xml index f8fc7ab032b..c924d1c8f4b 100644 --- a/stripe/res/layout/add_payment_method_card_layout.xml +++ b/stripe/res/layout/add_payment_method_card_layout.xml @@ -5,5 +5,5 @@ android:id="@+id/add_source_card_entry_widget" android:layout_width="match_parent" android:layout_height="wrap_content" - android:layout_margin="@dimen/add_card_total_margin" + android:layout_margin="@dimen/stripe_add_card_total_margin" /> diff --git a/stripe/res/layout/add_payment_method_card_row.xml b/stripe/res/layout/add_payment_method_card_row.xml index cc5b106b156..e734aff0411 100644 --- a/stripe/res/layout/add_payment_method_card_row.xml +++ b/stripe/res/layout/add_payment_method_card_row.xml @@ -4,18 +4,18 @@ xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="wrap_content" - android:layout_marginTop="@dimen/activity_total_margin" + android:layout_marginTop="@dimen/stripe_activity_total_margin" android:focusableInTouchMode="true" - android:paddingStart="@dimen/list_row_start_padding" - android:paddingEnd="@dimen/list_row_end_padding" - android:paddingTop="@dimen/add_payment_method_vertical_padding" - android:paddingBottom="@dimen/add_payment_method_vertical_padding" + android:paddingStart="@dimen/stripe_list_row_start_padding" + android:paddingEnd="@dimen/stripe_list_row_end_padding" + android:paddingTop="@dimen/stripe_add_payment_method_vertical_padding" + android:paddingBottom="@dimen/stripe_add_payment_method_vertical_padding" android:background="@drawable/simple_button_background" android:orientation="horizontal"> + android:layout_marginTop="@dimen/stripe_list_top_margin" /> diff --git a/stripe/res/layout/add_payment_method_fpx_row.xml b/stripe/res/layout/add_payment_method_fpx_row.xml index b825a384290..bfb5ab8ac5f 100644 --- a/stripe/res/layout/add_payment_method_fpx_row.xml +++ b/stripe/res/layout/add_payment_method_fpx_row.xml @@ -4,18 +4,18 @@ xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="wrap_content" - android:layout_marginTop="@dimen/activity_total_margin" + android:layout_marginTop="@dimen/stripe_activity_total_margin" android:focusableInTouchMode="true" - android:paddingStart="@dimen/list_row_start_padding" - android:paddingEnd="@dimen/list_row_end_padding" - android:paddingTop="@dimen/add_payment_method_vertical_padding" - android:paddingBottom="@dimen/add_payment_method_vertical_padding" + android:paddingStart="@dimen/stripe_list_row_start_padding" + android:paddingEnd="@dimen/stripe_list_row_end_padding" + android:paddingTop="@dimen/stripe_add_payment_method_vertical_padding" + android:paddingBottom="@dimen/stripe_add_payment_method_vertical_padding" android:background="@drawable/simple_button_background" android:orientation="horizontal"> @@ -95,7 +95,7 @@ android:visibility="visible" android:focusable="true" android:focusableInTouchMode="true" - android:layout_marginStart="@dimen/card_expiry_initial_margin" + android:layout_marginStart="@dimen/stripe_card_expiry_initial_margin" android:layout_gravity="start" /> @@ -115,7 +115,7 @@ android:maxLength="4" android:focusable="true" android:focusableInTouchMode="true" - android:layout_marginStart="@dimen/card_cvc_initial_margin" + android:layout_marginStart="@dimen/stripe_card_cvc_initial_margin" android:layout_gravity="start" /> diff --git a/stripe/res/layout/card_multiline_widget.xml b/stripe/res/layout/card_multiline_widget.xml index d543e76f093..6d2569a65ed 100644 --- a/stripe/res/layout/card_multiline_widget.xml +++ b/stripe/res/layout/card_multiline_widget.xml @@ -8,7 +8,7 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:hint="@string/acc_label_card_number" - android:layout_marginTop="@dimen/add_card_element_vertical_margin" + android:layout_marginTop="@dimen/stripe_add_card_element_vertical_margin" > @@ -39,7 +39,7 @@ android:id="@+id/tl_add_source_expiry_ml" android:layout_width="0dp" android:layout_height="wrap_content" - android:layout_marginEnd="@dimen/add_card_expiry_middle_margin" + android:layout_marginEnd="@dimen/stripe_add_card_expiry_middle_margin" android:layout_weight="1" android:hint="@string/acc_label_expiry_date" > @@ -50,7 +50,7 @@ android:layout_height="wrap_content" android:imeOptions="actionNext" android:inputType="date" - android:maxLength="@integer/date_length" + android:maxLength="@integer/stripe_date_length" android:nextFocusDown="@+id/et_add_source_cvc_ml" android:nextFocusForward="@+id/et_add_source_cvc_ml" /> @@ -61,7 +61,7 @@ android:id="@+id/tl_add_source_cvc_ml" android:layout_width="0dp" android:layout_height="wrap_content" - android:layout_marginEnd="@dimen/add_card_expiry_middle_margin" + android:layout_marginEnd="@dimen/stripe_add_card_expiry_middle_margin" android:layout_weight="1" > diff --git a/stripe/res/layout/fpx_bank.xml b/stripe/res/layout/fpx_bank.xml index b92f7ad6ec0..b45ac33bd5e 100644 --- a/stripe/res/layout/fpx_bank.xml +++ b/stripe/res/layout/fpx_bank.xml @@ -2,14 +2,14 @@ @@ -25,7 +25,7 @@ diff --git a/stripe/res/layout/masked_card_row.xml b/stripe/res/layout/masked_card_row.xml index 614d02353ed..4730dcebe66 100644 --- a/stripe/res/layout/masked_card_row.xml +++ b/stripe/res/layout/masked_card_row.xml @@ -3,13 +3,13 @@ xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="wrap_content" - android:paddingEnd="@dimen/list_row_end_padding" - android:paddingStart="@dimen/list_row_start_padding" + android:paddingEnd="@dimen/stripe_list_row_end_padding" + android:paddingStart="@dimen/stripe_list_row_start_padding" > + android:layout_height="@dimen/stripe_list_row_height"/> diff --git a/stripe/res/layout/masked_card_view.xml b/stripe/res/layout/masked_card_view.xml index e0f35fdd34f..9af6e22c2dc 100644 --- a/stripe/res/layout/masked_card_view.xml +++ b/stripe/res/layout/masked_card_view.xml @@ -4,7 +4,7 @@ @@ -14,14 +14,14 @@ android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="1" - android:layout_marginStart="@dimen/list_row_start_padding" + android:layout_marginStart="@dimen/stripe_list_row_start_padding" android:textAppearance="@android:style/TextAppearance.DeviceDefault.Medium" android:layout_gravity="center_vertical|start" /> diff --git a/stripe/res/layout/payment_auth_web_view_layout.xml b/stripe/res/layout/payment_auth_web_view_layout.xml index baa7718e6de..8b91219f6e5 100644 --- a/stripe/res/layout/payment_auth_web_view_layout.xml +++ b/stripe/res/layout/payment_auth_web_view_layout.xml @@ -9,7 +9,7 @@ android:layout_width="match_parent" android:layout_height="?attr/actionBarSize" android:background="?attr/colorPrimary" - android:elevation="@dimen/toolbar_elevation" + android:elevation="@dimen/stripe_toolbar_elevation" android:theme="@style/StripeToolBarStyle" app:title="@string/secure_checkout" /> diff --git a/stripe/res/layout/shipping_method_view.xml b/stripe/res/layout/shipping_method_view.xml index 11802c22dde..1f68f495be0 100644 --- a/stripe/res/layout/shipping_method_view.xml +++ b/stripe/res/layout/shipping_method_view.xml @@ -12,7 +12,7 @@ android:layout_alignParentStart="true" android:layout_alignParentTop="true" android:layout_toStartOf="@+id/shipping_method_price" - android:paddingTop="@dimen/shipping_widget_vertical_margin" + android:paddingTop="@dimen/stripe_shipping_widget_vertical_margin" android:textAppearance="@style/TextAppearance.AppCompat.Menu" /> - #e1e1e1 - #e1e1e1 - #a5a5a5 - #e1e1e1 - #1f1f1f - #000000 + #e1e1e1 + #e1e1e1 + #a5a5a5 + #e1e1e1 + #1f1f1f + #000000 - @android:color/secondary_text_dark + @android:color/secondary_text_dark diff --git a/stripe/res/values/colors.xml b/stripe/res/values/colors.xml index de1cb03e493..887353af478 100644 --- a/stripe/res/values/colors.xml +++ b/stripe/res/values/colors.xml @@ -1,19 +1,19 @@ - #ffeb1c26 - #ffe85746 - #ff2296f3 - #ff90A4AE - #ff32325d - #80323232 - #ff000000 - #3332325d - #ff3f51b5 - #ff324090 + #ffeb1c26 + #ffe85746 + #ff2296f3 + #ff90A4AE + #ff32325d + #80323232 + #ff000000 + #3332325d + #ff3f51b5 + #ff324090 - @android:color/white - @android:color/secondary_text_light + @android:color/white + @android:color/secondary_text_light - #DFDEDF - #D5473F + #DFDEDF + #D5473F diff --git a/stripe/res/values/constants.xml b/stripe/res/values/constants.xml index a271389f780..3f5b33454be 100644 --- a/stripe/res/values/constants.xml +++ b/stripe/res/values/constants.xml @@ -1,5 +1,5 @@ - 5 - 204 + 5 + 204 diff --git a/stripe/res/values/dimens.xml b/stripe/res/values/dimens.xml index da97d9b740f..fb573c9b453 100644 --- a/stripe/res/values/dimens.xml +++ b/stripe/res/values/dimens.xml @@ -1,31 +1,31 @@ - 8dp - 16dp - 12dp - 8dp - 16dp - 8dp - 12dp - 360dp - 200dp - 1000dp - 24dp - 8dp - 8dp - 24dp - 8dp - 1.52380955dp - 32dp - 8dp - 24dp - 4dp - 20dp - 8dp - 48dp - 14sp - 4dp - 4dp - 16dp - 12dp + 8dp + 16dp + 12dp + 8dp + 16dp + 8dp + 12dp + 360dp + 200dp + 1000dp + 24dp + 8dp + 8dp + 24dp + 8dp + 1.52380955dp + 32dp + 8dp + 24dp + 4dp + 20dp + 8dp + 48dp + 14sp + 4dp + 4dp + 16dp + 12dp diff --git a/stripe/res/values/ids.xml b/stripe/res/values/ids.xml index 6e51b2afd62..8a3cc5d25f2 100644 --- a/stripe/res/values/ids.xml +++ b/stripe/res/values/ids.xml @@ -1,7 +1,7 @@ - - - + + + diff --git a/stripe/res/values/styles.xml b/stripe/res/values/styles.xml index d1aa4708203..a7ca7891ff7 100644 --- a/stripe/res/values/styles.xml +++ b/stripe/res/values/styles.xml @@ -1,12 +1,12 @@