santomegonzalo / react-native-floating-action

Material design action button for React Native
MIT License
489 stars 180 forks source link

Floating action button is not clickable on android #193

Open Akashdeep312 opened 3 years ago

Akashdeep312 commented 3 years ago

hi i'm using following version of package and it's working fine on ios, i'm able to click and open other action buttons but the main FAB is not clickable on android adding sample code bellow

"react-native-floating-action": "^1.22.0",

code i'm using

                  <View style={{
                        zIndex: 1,
                        position: 'absolute',
                        alignSelf: "flex-end",
                        bottom: deviceHeight * 0.05,

                    }}>
                        <FloatingAction
                            floatingIcon={<Entypo name="plus" size={24} color={"#606977"} />}
                            actions={actionButtons}
                            distanceToEdge={{
                                vertical: deviceHeight * 0.05,
                                horizontal: deviceHeight * 0.01
                            }}
                            overlayColor={'rgba(255, 0, 0, 0)'}
                            color={colors.yellow.primary}
                            onPressItem={floatingButtonHandler}
                        />
                    </View>
pepe-dunamu commented 2 years ago

yes... i've been struggling with the same problem. if you solve this, please share me

deCodeIt commented 2 years ago

The only solution is to move FAB into the root view. The thing with touchables which are positioned absolutely is that the only touchable part will be that which is within the touchable's parent bounds.