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

Android Dropdown gap #52

Closed
jorge-o-murillo opened this issue Apr 12, 2022 · 5 comments
Closed

Android Dropdown gap #52

jorge-o-murillo opened this issue Apr 12, 2022 · 5 comments

Comments

@jorge-o-murillo
Copy link

jorge-o-murillo commented Apr 12, 2022

Hi @AdelRedaa97, thanks for this great repo.

I have an issue on Android where the Dropdown displays a gap between the button and the dropdown items. I copy/pasted the exact code provided in the demo1.js file on a reproducible snack: link
Screen Shot 2022-04-12 at 1 01 00 PM

iOS does not have this issue. Any help on this? Thanks.

@AdelRedaa97
Copy link
Owner

It's about android's StatusBar try to use this prop in Dropdown <SelectDropdown statusBarTranslucent={true}
https://github.com/AdelRedaa97/react-native-select-dropdown#statusBarTranslucent

or make <StatusBar translucent={false} />

@jorge-o-murillo
Copy link
Author

Thanks, adding <StatusBar translucent={false} /> worked.

@AdelRedaa97
Copy link
Owner

You can add this prop statusBarTranslucent={true} in will work too if you want to make android's StatusBar translucent is true

@jorge-o-murillo
Copy link
Author

jorge-o-murillo commented Apr 27, 2022

Hi there @AdelRedaa97, unfortunately on Android devices with a top notch the statusBarTranslucent={true} doesn't work properly. For example, if you try running this same code on a Samsung S10+ (link), it will turn out like this:
Screen Shot 2022-04-26 at 6 05 07 PM

Any Android device with a top notch has this issue (Pixel 4A, Samsung S10+, etc.). May be related to previous RN bugs: link

@LuizHGodoy
Copy link

already try use SafeAreaView? works fine for me here with statusBarTranslucent={true} inside the SafeAreaView

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants