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

Create new transparent theme for invisible activities #3443

Merged
merged 4 commits into from
Mar 9, 2021
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions example/res/values/styles.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,16 @@
<item name="android:layout_height">1dp</item>
<item name="android:background">?android:attr/listDivider</item>
</style>

<style name="FlickerAppTheme" parent="Theme.AppCompat">
brnunes-stripe marked this conversation as resolved.
Show resolved Hide resolved
<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:backgroundDimEnabled">true</item>
<item name="android:backgroundDimAmount">0.8</item>
<item name="android:windowAnimationStyle">@null</item>
<item name="android:windowActivityTransitions">true</item>
<item name="android:windowTransitionBackgroundFadeDuration">200</item>
</style>
</resources>
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
10 changes: 10 additions & 0 deletions stripe/res/values/themes.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,16 @@
<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 -->
brnunes-stripe marked this conversation as resolved.
Show resolved Hide resolved
<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