Skip to content

[Android] shouldShowCloseButton prop is ignored, close button always shows but works on ios #1912

Description

@RohiniH-07

Describe the bug

The shouldShowCloseButton prop on RevenueCatUI.CustomerCenterView is only wired up on iOS. On Android the prop is silently ignored, so the close button always shows regardless of the value passed.

  1. Environment

    1. Platform: Android
    2. SDK version: react-native-purchases-ui 10.7.0
    3. OS version: (varies, reproducible on multiple Android versions)
    4. Xcode/Android Studio version:
    5. React Native version: "0.86.2"
    6. SDK installation (CocoaPods + version or manual):yarn install
    7. How widespread is the issue: 100% of Android devices
  2. Debug logs that reproduce the issue
    N/A — this is a UI/prop wiring issue, no debug logs are produced.

Image
  1. Steps to reproduce, with a description of expected vs. actual behavior

Steps:

  1. Render <RevenueCatUI.CustomerCenterView shouldShowCloseButton={false} />
  2. Run on Android
  3. Observe the close button is still visible

Expected: The close button should be hidden when shouldShowCloseButton={false}, matching iOS behavior.
Actual: The close button remains visible on Android.

  1. Other information

On iOS the property is exported in ios/CustomerCenterViewManager.m:

RCT_EXPORT_VIEW_PROPERTY(shouldShowCloseButton, BOOL)
However, the Android CustomerCenterViewManager.kt does not declare a corresponding @ReactProp. Compare with BasePaywallViewManager.kt, which does handle displayCloseButton for the Paywall view via OPTION_DISPLAY_CLOSE_BUTTON.
Suggested fix: Add a @ReactProp(name = "shouldShowCloseButton") to CustomerCenterViewManager.kt that forwards the value to the underlying CustomerCenterView (similar to how BasePaywallViewManager.kt handles displayCloseButton for the paywall).


Additional context
N/A

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions