ammarahm-ed / react-native-actions-sheet

A Cross Platform(Android, iOS & Web) ActionSheet with a flexible api, native performance and zero dependency code for react native. Create anything you want inside ActionSheet.
https://rnas.vercel.app
MIT License
1.42k stars 119 forks source link

Strange actions sheet behaviour on Android #321

Closed Medkhat closed 2 weeks ago

Medkhat commented 8 months ago

Hi there! I wanted to implement this package, so, on iOS it works well. But, when I tested on Android, there was strange behavior of actions sheet.

Examples here:

https://github.com/ammarahm-ed/react-native-actions-sheet/assets/42961493/e8529990-8775-4e44-aec7-12bd17bc50e9

https://github.com/ammarahm-ed/react-native-actions-sheet/assets/42961493/2ac8082c-78f0-4fe4-9c40-3ac7fe88c648

Medkhat commented 8 months ago

Hello again! Does anyone know the answer to this?

mauricedoepke commented 8 months ago

For me everything is working fine. Can you post a running example of this error somewhere?

Do you possibly use a scrollview/flatlist in your sheet?

https://rnas.vercel.app/guides/scrollview

Medkhat commented 8 months ago

@mauricedoepke No I don't use scrollview/flatlist. I'll double check again.

Medkhat commented 7 months ago

@mauricedoepke Have you tested your code on both OS? So, can you provide your configs?

mauricedoepke commented 7 months ago

@Medkhat yes, i am using it in a production app and it works for me. It's too much work, for me to extract it. You have to provide a running example if you want help.

ammarahm-ed commented 7 months ago

Hi, provide a reproducible example of the issue on Android. Your RN version etc, provide complete information.

Medkhat commented 7 months ago

I created Expo Snack but here all is fine. However, I'm working with React Native CLI on my machine. I will check again when I build for Android. If it doesn't work out then I will come back. @mauricedoepke @ammarahm-ed Thank you so much!

oleksii-lyhun commented 5 months ago

Running with the same issue. It's reproducing randomly. On some devices, everything works well on some ActionSheet showing, and when pressing some buttons inside ActionSheet it's going to be not visible but not hidden "react-native-actions-sheet": "0.9.0-alpha.24", "react": "18.2.0", "react-native": "0.72.1",

Kavosh-m commented 3 months ago

same. any workaround yet?

JaifDev commented 2 weeks ago

Any fixes for this? I am facing the same issue on newArch

Medkhat commented 2 weeks ago

@JaifDev @Kavosh-m I don't know how it was fixed. I finished the iOS version of my app, and after this, I ran it on Android. Currently, everything is fine. So, please check your imports or other configurations. After registering the sheets, you need to import the relevant file into App.tsx. Also, make sure to check the import of react-native-gesture-handler in the index.js file.

index.js:

...
import 'react-native-gesture-handler';
...

actions-sheet-manager.ts:

import {registerSheet} from 'react-native-actions-sheet';
registerSheet('YourExampleSheet', YourExampleSheet);

App.tsx:

...
import '@/actions-sheet-manager';
...