-
Notifications
You must be signed in to change notification settings - Fork 82
PaywallActivityLauncher: Add edgeToEdge
parameter to display paywall in full screen
#2530
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
Conversation
…play paywall in full screen
@@ -52,18 +52,22 @@ class PaywallActivityLauncher(resultCaller: ActivityResultCaller, resultHandler: | |||
* will be used. Only available for original template paywalls. Ignored for v2 Paywalls. | |||
* @param shouldDisplayDismissButton Whether to display the dismiss button in the paywall. | |||
* Only available for original template paywalls. Ignored for v2 Paywalls. | |||
* @param shouldDisplayEdgeToEdge Whether to display the paywall in edge-to-edge mode. | |||
* Default is true for Android 16+, false otherwise. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was doubting whether it's worth to default to the same across android versions... But I think we shouldn't cause a breaking change in older android versions.
import android.os.Parcelable | ||
import com.revenuecat.purchases.ui.revenuecatui.fonts.ParcelizableFontProvider | ||
import com.revenuecat.purchases.ui.revenuecatui.fonts.PaywallFontFamily | ||
import com.revenuecat.purchases.ui.revenuecatui.fonts.TypographyType | ||
import kotlinx.parcelize.Parcelize | ||
|
||
internal const val DEFAULT_DISPLAY_DISMISS_BUTTON = true | ||
internal val defaultDisplayEdgeToEdge = Build.VERSION.SDK_INT >= Build.VERSION_CODES.VANILLA_ICE_CREAM |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was actually thinking about this default... I changed it to also use edge to edge on android 35+, since that's the default starting on that version.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very nice to have this!!
...src/main/kotlin/com/revenuecat/purchases/ui/revenuecatui/activity/PaywallActivityLauncher.kt
Outdated
Show resolved
Hide resolved
scripts/api-dump.sh
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
chmod changes I guess? Was this necessary on your machine? (You can run this script in Android Studio via the run configuration.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah had to add extra permissions to be able to run it from terminal (didn't try to run from AS, thanks for the tip!)
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #2530 +/- ##
=======================================
Coverage 77.93% 77.93%
=======================================
Files 286 286
Lines 10572 10572
Branches 1485 1485
=======================================
Hits 8239 8239
Misses 1687 1687
Partials 646 646 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
shouldDisplayEdgeToEdge
parameter to display paywall in full screenedgeToEdge
parameter to display paywall in full screen
**This is an automatic release.** ## RevenueCat SDK ### Virtual Currency #### ✨ New Features * Virtual Currency Support (#2519) via Will Taylor (@fire-at-will) ## RevenueCatUI SDK ### Paywallv2 #### ✨ New Features * PaywallActivityLauncher: Add `edgeToEdge` parameter to display paywall in full screen (#2530) via Toni Rico (@tonidero) #### 🐞 Bugfixes * Remove logic to avoid repurchasing already subscribed products (#2492) via Toni Rico (@tonidero) ### 🔄 Other Changes * Dont run VC tests on load shedder integration tests (#2538) via Will Taylor (@fire-at-will) * Introduces `CompatComposeView` to handle scenarios where the view tree is not set up (#2527) via JayShortway (@JayShortway) Co-authored-by: revenuecat-ops <ops@revenuecat.com>
…l in full screen (#2530) ### Description We currently were not supporting edge to edge in paywalls when using the `launch` and `launchIfNeeded` APIs. This adds a new parameter that allows to display it in edgeToEdge mode, or not. The default will be true for Android 15+ and false otherwise.
Description
We currently were not supporting edge to edge in paywalls when using the
launch
andlaunchIfNeeded
APIs. This adds a new parameter that allows to display it in edgeToEdge mode, or not.The default will be true for Android 15+ and false otherwise.