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

Fix regression in CardInputWidget styling #2002

Merged
merged 1 commit into from
Dec 24, 2019
Merged

Conversation

mshafrir-stripe
Copy link
Collaborator

The android:textSize attribute in card_input_widget.xml was
hardcoded in #1930, preventing styling of the CardInputWidget's
EditText fields.

Introduce a base style Stripe.Base.CardInputWidget.EditText, and
override it with Stripe.CardInputWidget.EditText to allow for
user customization.

For example, in your app's style.xml, if you add the following:

<style name="Stripe.CardInputWidget.EditText" parent="Stripe.Base.CardInputWidget.EditText">
    <item name="android:textSize">22sp</item>
    <item name="android:textColor">@android:color/holo_blue_light</item>
    <item name="android:textColorHint">@android:color/holo_orange_light</item>
</style>

Screenshot_1577132333

Fixes #1997

The `android:textSize` attribute in `card_input_widget.xml` was
hardcoded in #1930, preventing styling of the `CardInputWidget`'s
EditText fields.

Introduce a base style `Stripe.Base.CardInputWidget.EditText`, and
override it with `Stripe.CardInputWidget.EditText` to allow for
user customization.

For example, in your app's `style.xml`, if you add the following:

```
<style name="Stripe.CardInputWidget.EditText" parent="Stripe.Base.CardInputWidget.EditText">
    <item name="android:textSize">22sp</item>
    <item name="android:textColor">@android:color/holo_blue_light</item>
    <item name="android:textColorHint">@android:color/holo_orange_light</item>
</style>
```

Fixes #1997
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

How to style CardInputWidget on 12.7.0+
6 participants