Skip to content

Commit

Permalink
Fix 3DS Black Screen Bug on Android 14 (#1025)
Browse files Browse the repository at this point in the history
* Add translucent theme to ThreeDSecureActivity.

* Add reference links.

* Update CHANGELOG.
  • Loading branch information
sshropshire authored Jun 6, 2024
1 parent b0a7121 commit e3ff614
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
* ShopperInsights (BETA)
* Requires opt in - `@OptIn(ExperimentalBetaApi::class)`
* Add `ShopperInsightsClient.getRecommendedPaymentMethods()` for returning recommendations based on the buyer
* ThreeDSecure
* Fix issue that causes a black screen to display after successful 3DS validation.

## 4.46.0 (2024-05-30)

Expand Down
2 changes: 1 addition & 1 deletion ThreeDSecure/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
<application>
<activity
android:name="com.braintreepayments.api.ThreeDSecureActivity"
android:theme="@style/Theme.AppCompat" />
android:theme="@style/Theme.Translucent.NoTitleBar.Fullscreen" />
</application>
</manifest>
21 changes: 21 additions & 0 deletions ThreeDSecure/src/main/res/values/themes.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!-- Ref: https://stackoverflow.com/a/21492572 -->
<!-- Ref: https://github.com/aosp-mirror/platform_frameworks_base/blob/dc2cfc8a10b8b74ec2c70f3b2d32aa9bf765de87/core/res/res/values/themes.xml#L678C1-L698C13 -->
<style name="Theme.Translucent" parent="Theme.AppCompat">
<item name="android:windowBackground">#00000000</item>
<item name="android:colorBackgroundCacheHint">@null</item>
<item name="android:windowIsTranslucent">true</item>
<item name="android:windowAnimationStyle">@null</item>
</style>

<style name="Theme.Translucent.NoTitleBar">
<item name="android:windowActionBar">false</item>
<item name="android:windowNoTitle">true</item>
<item name="android:windowContentOverlay">@null</item>
</style>

<style name="Theme.Translucent.NoTitleBar.Fullscreen">
<item name="android:windowFullscreen">true</item>
</style>
</resources>

0 comments on commit e3ff614

Please sign in to comment.