Skip to content

Commit

Permalink
Create new transparent theme for invisible activities (#3443)
Browse files Browse the repository at this point in the history
* Create new transparent theme.
  • Loading branch information
brnunes-stripe authored Mar 9, 2021
1 parent 6a976b9 commit 9a58e7f
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
2 changes: 1 addition & 1 deletion stripe/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
android:windowSoftInputMode="adjustResize" />
<activity
android:name=".view.PaymentRelayActivity"
android:theme="@style/StripeDefaultTheme" />
android:theme="@style/StripeTransparentTheme" />
<activity
android:name=".view.Stripe3ds2CompletionActivity"
android:theme="@style/StripeDefaultTheme" />
Expand Down
14 changes: 13 additions & 1 deletion stripe/res/values/themes.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>

<style name="StripeBaseTheme" parent="@style/Theme.AppCompat.DayNight.NoActionBar">
<item name="colorAccent">@color/stripe_accent_color_default</item>
<item name="colorControlNormal">@color/stripe_control_normal_color_default</item>
Expand All @@ -9,9 +10,20 @@
<item name="android:textColorSecondary">@color/stripe_text_color_secondary</item>
</style>

<style name="StripeDefaultTheme" parent="StripeBaseTheme"/>
<style name="StripeDefaultTheme" parent="StripeBaseTheme" />

<style name="StripeDefault3DS2Theme" parent="BaseStripe3DS2Theme" />

<!-- Theme used by Activities that do not show any UI, so the activity underneath them is still fully visible -->
<style name="StripeTransparentTheme" parent="Theme.AppCompat">
<item name="android:windowIsTranslucent">true</item>
<item name="android:windowBackground">@android:color/transparent</item>
<item name="android:windowContentOverlay">@null</item>
<item name="android:windowNoTitle">true</item>
<item name="android:windowIsFloating">true</item>
<item name="android:backgroundDimEnabled">false</item>
</style>

<style name="StripePaymentSheetBaseTheme" parent="@style/Theme.MaterialComponents.DayNight.NoActionBar">
<item name="android:windowIsTranslucent">true</item>
<item name="android:windowBackground">@android:color/transparent</item>
Expand Down

0 comments on commit 9a58e7f

Please sign in to comment.