stripe-android
stripe-android copied to clipboard
[Feature] Apply specific PaymentBottomSheet theme like on iOS SDK (light | dark)
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.
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)
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