stripe-android icon indicating copy to clipboard operation
stripe-android copied to clipboard

[Feature] Apply specific PaymentBottomSheet theme like on iOS SDK (light | dark)

Open magnumrocha opened this issue 3 years ago • 1 comments

Is your feature request related to a problem? Please describe. My App has no support for Dark theme mode yet and the Stripe Payment BottomSheet always appears on the System's theme, which makes it very different from my App style when on dark mode.

Describe the solution you'd like Have a property on PaymentSheet.Configuration class to set up the desired theme.

Describe alternatives you've considered Given the possibility to override the Stripe Payment BottomSheet attributes by style XML attributes.

magnumrocha avatar Sep 27 '21 15:09 magnumrocha

Hey there.

We've been looking into this issue here

The short is that we have a feature like this in our backlog. There is a potential work around for you. You can call this method early in your app's life and force dark/light mode on your app. Let me know if it works for you. Otherwise, you may have to wait until we implement more advanced customization.

// force dark
AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_YES)
// force light 
AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_NO)

skyler-stripe avatar Sep 27 '21 17:09 skyler-stripe

Customizing the PaymentSheet appearance has been live for some time now. You can learn more on the docs and give it a try: https://stripe.com/docs/elements/appearance-api?platform=android

brnunes-stripe avatar Oct 26 '22 03:10 brnunes-stripe