Skip to content

Conversation

tonidero
Copy link
Contributor

@tonidero tonidero commented Jul 15, 2025

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.

@@ -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.
Copy link
Contributor Author

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.

@tonidero tonidero marked this pull request as ready for review July 15, 2025 15:39
@tonidero tonidero requested review from a team July 15, 2025 15:40
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
Copy link
Contributor Author

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.

Copy link
Member

@JayShortway JayShortway left a 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!!

Copy link
Member

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.)

Copy link
Contributor Author

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!)

Copy link

codecov bot commented Jul 15, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 77.93%. Comparing base (370838c) to head (36fd95e).
Report is 5 commits behind head on main.

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@tonidero tonidero changed the title PaywallActivityLauncher: Add shouldDisplayEdgeToEdge parameter to display paywall in full screen PaywallActivityLauncher: Add edgeToEdge parameter to display paywall in full screen Jul 16, 2025
@tonidero tonidero added this pull request to the merge queue Jul 16, 2025
Merged via the queue into main with commit b9a831c Jul 16, 2025
14 checks passed
@tonidero tonidero deleted the add-should-display-edge-to-edge-parameter branch July 16, 2025 09:47
github-merge-queue bot pushed a commit that referenced this pull request Jul 17, 2025
**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>
tonidero added a commit that referenced this pull request Aug 25, 2025
…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.
@tonidero tonidero mentioned this pull request Aug 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants