How do I create a footer-only v2 Paywall and display it in native Android below another @Composable?
Hi
Do you have a design image of what you are trying to achieve? I’m not sure I understand the footer-only paywall you mean. You should show your packages somewhere in your paywall.
Best,
This is the paywall I have created in the Paywall Editor. I have created only the footer section of the paywall (see the component tree) but when used with the Android SDK it still takes up the entire screen.

I would like to have the upper part easily customized directly in my code using Jetpack Compose and only have the footer part fetched from the API.
Right now I have it solved like this but there is probably a better way.
@Composable
private fun PaywallPager() {
...
}
@Composable
fun PaywallScreen(
setShouldPaywall: (Boolean) -> Unit
) {
val ENTITLEMENT_ID = "<MY_ENTITLEMENT_ID>"
Column (
modifier = Modifier
.background(colorResource(MR.colors.primaryBackground))
.fillMaxSize()
) {
Column (
verticalArrangement = Arrangement.Center,
horizontalAlignment = Alignment.CenterHorizontally,
modifier = Modifier
.weight(1f)
) {
PaywallPager()
}
Box (
Modifier
.height(IntrinsicSize.Min)
) {
Paywall(
PaywallOptions.Builder({})
.setListener(object : PaywallListener {
override fun onPurchaseCompleted(
customerInfo: CustomerInfo,
storeTransaction: StoreTransaction
) {
if (customerInfo.entitlements.active.containsKey(ENTITLEMENT_ID)) {
setShouldPaywall(false)
}
}
override fun onRestoreCompleted(customerInfo: CustomerInfo) {
if (customerInfo.entitlements.active.containsKey(ENTITLEMENT_ID)) {
setShouldPaywall(false)
}
}
})
.build(),
)
}
}
}
Hi
Thanks for sharing this! It’s a pretty smart way to handle it, unfortunately there’s no other way to achieve this but I’ve shared it with the team so we can support it in the future.
Best,
Reply
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.