Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow CardMultilineWidget's TextInputLayout's to be styled #2646

Merged
merged 2 commits into from
Jul 16, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions stripe/res/layout/card_multiline_widget.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
android:layout_height="wrap_content"
android:hint="@string/acc_label_card_number"
android:layout_marginTop="@dimen/stripe_add_card_element_vertical_margin"
style="@style/Widget.Design.TextInputLayout"
style="@style/Stripe.CardMultilineWidget.TextInputLayout"
>

<com.stripe.android.view.CardNumberEditText
Expand Down Expand Up @@ -43,7 +43,7 @@
android:layout_marginEnd="@dimen/stripe_add_card_expiry_middle_margin"
android:layout_weight="1"
android:hint="@string/acc_label_expiry_date"
style="@style/Widget.Design.TextInputLayout"
style="@style/Stripe.CardMultilineWidget.TextInputLayout"
>

<com.stripe.android.view.ExpiryDateEditText
Expand All @@ -65,7 +65,7 @@
android:layout_height="wrap_content"
android:layout_marginEnd="@dimen/stripe_add_card_expiry_middle_margin"
android:layout_weight="1"
style="@style/Widget.Design.TextInputLayout"
style="@style/Stripe.CardMultilineWidget.TextInputLayout"
>

<com.stripe.android.view.CvcEditText
Expand All @@ -84,7 +84,7 @@
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
style="@style/Widget.Design.TextInputLayout"
style="@style/Stripe.CardMultilineWidget.TextInputLayout"
>

<com.stripe.android.view.PostalCodeEditText
Expand Down
7 changes: 7 additions & 0 deletions stripe/res/values/styles.xml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,13 @@
<style name="Stripe.CardInputWidget.TextInputLayout"
parent="Stripe.Base.CardInputWidget.TextInputLayout" />

<style name="Stripe.Base.CardMultilineWidget.TextInputLayout"
parent="Widget.Design.TextInputLayout">
</style>

<style name="Stripe.CardMultilineWidget.TextInputLayout"
parent="Stripe.Base.CardInputWidget.TextInputLayout" />
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be Stripe.Base.CardMultilineWidget.TextInputLayout?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

whoops, good catch.


<style name="Stripe.Base.BecsDebitWidget.EditText" parent="Widget.AppCompat.EditText">
<item name="android:textSize">@dimen/stripe_becs_debit_widget_edit_text_size</item>
</style>
Expand Down