Skip to content

Commit

Permalink
fix: remove additional margin in cardform (#1234)
Browse files Browse the repository at this point in the history
  • Loading branch information
charliecruzan-stripe authored Dec 7, 2022
1 parent 2215704 commit 3a475f4
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

- Fixed the `ShippingMethod` type to contain the `isPending` field instead of a `type` field (which previously was never correct). This reflects the inputs accepted. [#1227](https://github.com/stripe/stripe-react-native/pull/1227)
- Fixed the `ShippingMethod` type to contain the `startDate` and `endDate` keys, if applicable. [#1227](https://github.com/stripe/stripe-react-native/pull/1227)
- Fixed extra margin that was being added to `<CardForm />` on Android. [#1234](https://github.com/stripe/stripe-react-native/pull/1234)

## 0.22.0 - 2022-12-02

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package com.reactnativestripesdk

import android.content.res.ColorStateList
import android.graphics.Color
import android.graphics.Typeface
import android.os.Build
import android.text.Editable
import android.text.InputFilter
Expand Down Expand Up @@ -143,7 +142,6 @@ class CardFieldView(context: ThemedReactContext) : FrameLayout(context) {
}
}

mCardWidget.setPadding(40, 0, 40, 0)
mCardWidget.background = MaterialShapeDrawable(
ShapeAppearanceModel()
.toBuilder()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ package com.reactnativestripesdk

import android.content.res.ColorStateList
import android.graphics.Color
import android.graphics.Typeface
import android.os.Build
import android.text.InputFilter
import android.view.View
import android.view.View.OnFocusChangeListener
import android.widget.FrameLayout
import androidx.core.view.setMargins
import com.facebook.react.bridge.ReadableMap
import com.facebook.react.uimanager.PixelUtil
import com.facebook.react.uimanager.ThemedReactContext
Expand Down Expand Up @@ -40,7 +40,7 @@ class CardFormView(context: ThemedReactContext) : FrameLayout(context) {
init {
cardFormViewBinding.cardMultilineWidgetContainer.isFocusable = true
cardFormViewBinding.cardMultilineWidgetContainer.isFocusableInTouchMode = true

(cardFormViewBinding.cardMultilineWidgetContainer.layoutParams as MarginLayoutParams).setMargins(0)
addView(cardForm)
setListeners()

Expand Down Expand Up @@ -191,7 +191,6 @@ class CardFormView(context: ThemedReactContext) : FrameLayout(context) {
}
}

cardFormViewBinding.cardMultilineWidgetContainer.setPadding(40, 0, 40, 0)
cardFormViewBinding.cardMultilineWidgetContainer.background = MaterialShapeDrawable(
ShapeAppearanceModel()
.toBuilder()
Expand Down

0 comments on commit 3a475f4

Please sign in to comment.