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

Expose ability to enable postal code on CardInputWidget #1951

Merged
merged 1 commit into from
Dec 16, 2019

Conversation

mshafrir-stripe
Copy link
Collaborator

@mshafrir-stripe mshafrir-stripe commented Dec 16, 2019

Postal code can either be enabled via layout or code.

  1. Layout
        <com.stripe.android.view.CardInputWidget
            android:id="@+id/card_input_widget"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            app:shouldShowPostalCode="true" />
  1. Code
    a. Java: cardInputWidget.setPostalCodeEnabled(true)
    b. Kotlin: cardInputWidget.postalCodeEnabled = true

Fixes: #1807

Postal code can either be enabled via layout or code.

1. Layout:
```
        <com.stripe.android.view.CardInputWidget
            android:id="@+id/card_input_widget"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            app:shouldShowPostalCode="true" />
```

2. Code
  a. Java: `cardInputWidget.setPostalCodeEnabled(true)`
  b. Kotlin: `cardInputWidget.postalCodeEnabled = true`

Fixes: #1807
@mshafrir-stripe mshafrir-stripe merged commit 1a623a6 into master Dec 16, 2019
@mshafrir-stripe mshafrir-stripe deleted the enable-postal-code branch December 16, 2019 22:30
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.

Add postal code support to CardInputWidget
6 participants