Closed toeurtenh closed 4 years ago
I've having this same issue in version 3.11.0
. This issue also applies if the container element is absolutely positioned.
@mujavidb have you solved it?
@toeurtenh I reverted library back to 3.0.9
for now.
@toeurtenh I reverted library back to
3.0.9
for now.
This worked for me. I wonder what made it break but for some reason I didn't notice this until after I made the apk.
It seems to be android only. Navigation in iOS works fine.
have still not figured it out
Thanks for this issue @toeurtenh , and thank you for the code snippet.
Can you provide a reproducible example as a Snack or in a public repo? Something one of the maintainers can use w/o bootstrapping a new React Native app
@matthamil I made a snack here. Run on Android to see issue.
@matthamil sorry I don't use snack. @mujavidb thank you for making the snack, hope we get a solution from maintainer.
I met the same issue. Has someone solved this problem? I tried with 3.0.9, but not work.
Not sure what's going on here or why comments are being mysteriously deleted. Does anyone know anything about when this will be fixed?
It's not this repo. It's react-navigation/tabs
and this is the commit that broke it:
https://github.com/react-navigation/tabs/commit/2a1d7538d65e79b90c572cf078d0534e1cacc13d#diff-a8d6ae7794fbc09aaea535c1c7103754
Best option is to add a containerStyle
prop to react-navigation-tabs
. Then add position: 'absolute', zIndex: 1
to containerStyle
@satya164 Fix implemented in this PR https://github.com/react-navigation/tabs/pull/154
Until this gets merged and published, feel free to use my fork https://www.npmjs.com/package/@mcmar/react-navigation-tabs
import { createBottomTabNavigator } from '@mcmar/react-navigation-tabs';
Best option is to add a
containerStyle
prop toreact-navigation-tabs
. Then addposition: 'absolute', zIndex: 1
tocontainerStyle
This worked for me! Thanks!! Just one thing to not in case someone else falls into the same trap, if you add these styles to the react-navigation-tabs
, then remove the absolute
rule on tabBarOptions.style.position
.
Not sure what's going on here or why comments are being mysteriously deleted. Does anyone know anything about when this will be fixed?
Comments like "+1" and "I am also experiencing this" were removed since they only add noise to GitHub issues. To answer your question @mcmar
I was able to remedy this by making sure to specify width in the style object of tabBarOptions. I realized after throwing a border around the tabs that it had any empty width so it would make since that it wasn't touchable.
edit: I had to add a zIndex value for tabs to respond to touch on Android
tabBarOptions: {
activeTintColor: '#FFFFFF',
inactiveTintColor: '#F8F8F8',
style: {
width: '100%',
position: 'absolute',
zIndex: 1,
backgroundColor: 'rgba(0, 0, 0, 0.8)',
marginTop: EStyleSheet.value('5.25rem'),
borderWidth: 1,
borderColor: 'red'
},
}
Another temporary solution would be to use https://www.npmjs.com/package/patch-package and to apply the fix in the source code of react-navigation/tabs while the PR isn't accepted.
It's already fixed with latest tabs https://github.com/react-navigation/tabs/releases/tag/v2.5.6
@satya164 Its not working.
I am using "react-navigation-tabs": "^2.6.0", "react": "16.8.6", "react-native": "0.60.5",
I am currently facing the same issue with "react-navigation/bottom-tabs": "^6.2.0",
Hey! This issue is closed and isn't watched by the core team. You are welcome to discuss the issue with others in this thread, but if you think this issue is still valid and needs to be tracked, please open a new issue with a repro.
I have made navigation bottom tab background color transparent by adding
but when I click on other tabs it doesn't work but when I remove abosolute from position it works but the background is not transparent.
and ideas? please help