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 android payment sheet shapes not rendering correct when using double type #1933

Conversation

volkanakbayir
Copy link
Contributor

'double' value type was not affecting the android side of rendering and creating inconsistent UI among Android's and iOS's UI rendering when tried to change payment sheet appearance. Using integer values is fixing this issue for android to actually abide this. iOS can also use the integer values as well.

That is of course a breaking change and needs to be discussed carefully. There maybe a better solution for this to handle it properly elsewhere like the platform code themselves? I see the code is copied from stripe-react-native I didn't want to touch that part.

Also added missing 'borderRadius' support for "PaymentSheetPrimaryButtonShape" class as this is already supported by both of the sdk's as well as in the stripe-react-native implementation.

'double' value type was creating issues with Android's rendering when tried to change payment sheet appearance. Using integer values is fixing this issue. That is of course a breaking change and needs to be discussed carefully.

Also added missing 'borderRadius' support for "PaymentSheetPrimaryButtonShape" class as this is already supported by both of the sdk's as well as in the stripe-react-native implementation.
@volkanakbayir volkanakbayir changed the title bugfix: android shapes fixed by using int values instead of double bugfix: android payment sheet shapes not rendering correct when using double type Sep 19, 2024
@volkanakbayir volkanakbayir changed the title bugfix: android payment sheet shapes not rendering correct when using double type Fix android payment sheet shapes not rendering correct when using double type Sep 20, 2024
@jonasbark
Copy link
Member

Thanks for the PR!

The double -> int change is not necessary. Would you mind updating your PR and change the ReadableMap.java class from:

throw new Exception("We've got a double here");

to:

return (int) getDouble(key);

jonasbark added a commit that referenced this pull request Sep 28, 2024
@jonasbark
Copy link
Member

Done in #1942

@jonasbark jonasbark closed this Sep 28, 2024
remonh87 pushed a commit that referenced this pull request Oct 1, 2024
…S fix (#1942)

* Fix border radius handling, see #1933

* throw warning when incompatible com.android.application plugin is used

see #1909

* throw warning when incompatible com.android.application plugin is used

see #1909

* remove unnecessary println

* Fix iOS issue from #1928
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants