Skip to content
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

Foreground={true} removes background for touchables #2632

Closed
JoshuaJADaniel opened this issue Oct 12, 2023 · 2 comments · Fixed by #2642
Closed

Foreground={true} removes background for touchables #2632

JoshuaJADaniel opened this issue Oct 12, 2023 · 2 comments · Fixed by #2642
Assignees
Labels
Platform: Android This issue is specific to Android Repro provided A reproduction with a snack or repo is provided

Comments

@JoshuaJADaniel
Copy link

Description

Not sure if this is expected behavior mentioned somewhere in the docs, but setting the foreground prop to true on any touchable causes any background styles to be discarded in Android.

image

Steps to reproduce

  1. Open the Snack
  2. Select Android
  3. Run either locally or online

Snack or a link to a repository

https://snack.expo.dev/@joshuajadaniel/rngh---foreground-property-effect-on-background

Gesture Handler version

~2.12.0

React Native version

0.72.3

Platforms

Android

JavaScript runtime

Hermes

Workflow

Expo managed workflow

Architecture

Paper (Old Architecture)

Build type

Debug mode

Device

Android emulator

Device model

No response

Acknowledgements

Yes

@github-actions github-actions bot added Platform: Android This issue is specific to Android Repro provided A reproduction with a snack or repo is provided labels Oct 12, 2023
@m-bert m-bert self-assigned this Oct 17, 2023
@m-bert
Copy link
Contributor

m-bert commented Oct 17, 2023

Hi @JoshuaJADaniel! I've just created this PR, could you please check if it helps?

@JoshuaJADaniel
Copy link
Author

JoshuaJADaniel commented Oct 17, 2023

Hey @m-bert, just tested with release build and your changes do fix the issue.

m-bert added a commit that referenced this issue Oct 18, 2023
## Description

This PR aims to fix background color issue on android. If you set
`foreground` prop to `true` on our `Buttons`, background color doesn't
update.

Fixes #2632 

## Test plan

Tested on the code from issue.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Platform: Android This issue is specific to Android Repro provided A reproduction with a snack or repo is provided
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants