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

Android does not overlap the navigation bar #325

Closed sbalcin closed 5 months ago

sbalcin commented 7 months ago

Hi, is there any way to remove navigation bar on bottom sheet on Android or changing color of it, where is the theme coming from, how can i override it? By the way it's already overlapping on IOS.

Screenshot 2023-12-13 at 11 11 34
jonxssc commented 7 months ago

+1 i would also like to know that, i have only found how to change the color of the navigationbar but not how to make it transparent, i tried this using react-native-navigation but somehow the Actionsheet overrides it to a color <Stack.Navigator screenOptions={{navigationBarColor:'transparent'}}>

IhorReactNative commented 6 months ago

I had same issue too:

Screenshot 2024-01-01 at 20 54 32

Fixed via patch-package

diff --git a/node_modules/react-native-actions-sheet/dist/src/styles.js b/node_modules/react-native-actions-sheet/dist/src/styles.js
index 41d60b0..685271f 100644
--- a/node_modules/react-native-actions-sheet/dist/src/styles.js
+++ b/node_modules/react-native-actions-sheet/dist/src/styles.js
@@ -19,8 +19,7 @@ export var styles = StyleSheet.create({
         alignSelf: "center"
     },
     parentContainer: {
-        width: "100%",
-        height: "100%",
+        flex: 1,
         justifyContent: "center",
         alignItems: "center"
     }

Result: Screenshot 2024-01-01 at 20 58 46

jonxssc commented 6 months ago

Different approche is to just set isModal={false}, thats how i "fixed" it.

ammarahm-ed commented 6 months ago

I will add this to docs later but you can fix that on android using this, on iOS it's already correct I think. https://stackoverflow.com/questions/74256638/react-native-modal-bypasses-expo-navigation-bar-setting