Skip to content

Conversation

@ish1416
Copy link

@ish1416 ish1416 commented Nov 7, 2025

Summary:

Fixes #54372 #54298

The android_ripple prop on Pressable components stopped working in React Native 0.82.1 when foreground: false (the default value). This regression was introduced by the new background drawable system.

Root Cause: The setFeedbackUnderlay method in BackgroundStyleApplicator.kt was creating a new CompositeBackgroundDrawable with the ripple effect but not assigning it back to the view's background, causing the ripple to be invisible.

Solution: Modified the method to properly assign the new composite drawable containing the ripple effect to view.background.

Changelog:

[ANDROID] [FIXED] - Fix android_ripple not working with foreground: false in Pressable components

Test Plan:

Before the fix: Create a Pressable with android_ripple and foreground: false (default) - no ripple effect appears when pressed.

After the fix: The ripple effect works correctly.

Test case:

<Pressable
  android_ripple={{ color: 'red', borderless: false }}
  onPress={() => console.log('Pressed!')}
>
  <Text>Press Me</Text>
</Pressable>

- Fix setFeedbackUnderlay method to properly set view background
- Resolves issue where ripple drawable was created but not applied
- Fixes regression introduced by new background drawable system
- Addresses issue facebook#54372
@meta-cla
Copy link

meta-cla bot commented Nov 7, 2025

Hi @ish1416!

Thank you for your pull request and welcome to our community.

Action Required

In order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you.

Process

In order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA.

Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with CLA signed. The tagging process may take up to 1 hour after signing. Please give it that time before contacting us about it.

If you have received this in error or have any questions, please contact us at [email protected]. Thanks!

@freeboub
Copy link

freeboub commented Nov 7, 2025

For information, I confirm this is fixing the issue. I checked the backgroundColor is still well displayed, but I am not sure what else should be checked (maybe CSS shadows ?!)

@meta-cla
Copy link

meta-cla bot commented Nov 7, 2025

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Meta Open Source project. Thanks!

@meta-cla meta-cla bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Nov 7, 2025
@facebook-github-bot facebook-github-bot added the Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team. label Nov 7, 2025
@ish1416
Copy link
Author

ish1416 commented Nov 8, 2025

@mdvacca @shergin
Can you please review this PR and merge if its possible?

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

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Regression] android_ripple doesn't work anymore on RN 0.82.1

3 participants