My bottom tab navigator is set to absolute position with background trasparent, but when i go to the map Tab i want the tab to change from posision absolute to relative Is it possible? Thanks in advance!
Asked
Active
Viewed 1,414 times
0
-
you can render your own component with any position. – Waheed Akhtar Jun 13 '20 at 09:35
-
no i mean when i press the tab icon i want in this particular screen the whole tabBar to go from absolute position to relative – JamesV Jun 13 '20 at 09:51
-
Sorry, I didn't get you, Any example? – Waheed Akhtar Jun 13 '20 at 09:53
-
i Have a Tab.Navigator with 3 tabs. Lets say First Tab is Home, second Tab is Map and third Tab is settings. I have set barStyle to position absolute for all tabs at Tab.Navigator but when i want to go to Map tab Screen i want the Tab to not be absolute(i want the whole tab to be absolute transparent only on Home and settings) – JamesV Jun 13 '20 at 10:04
-
then what happens after pressing the second tab? – Waheed Akhtar Jun 13 '20 at 10:06
-
When i press the second tab it navigates me to Map tab Screen..I want the whole Tab.navigator to be absolute and transparent only when i am in Home Tab and Settings Tab and i want to change Tab.Navigator to static/relative while in Map Tab – JamesV Jun 13 '20 at 10:21
1 Answers
0
Try navigation.isFocused()
or
const {name} = useRoute();
const position = name === 'Map' ? 'absolute' : 'relative';

Four
- 734
- 5
- 9