-
-
Notifications
You must be signed in to change notification settings - Fork 5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hide TabBar #136
Comments
We currently have a I think it would make sense to add a |
@ericvicenti am I right when I say that |
In my particular case I don't need the tabBar to animate. |
Yeah I think we can skip the animation for it. Maybe somebody will want it one day, but I think we can help @microwavesafe's use case pretty easily |
Adding good first task label then. Should be easy to implement. |
I've got this roughly working, I've implemented the visible check in the render function of TabView.js.
I'm not convinced that's the easiest way to get the tabBar through getScreenConfig, but I can't find an easier way. Also at the moment, this is leaving the rest of the page still sitting above a now empty tab bar. So not sure this is really how I should be doing it. |
Can you show a screenshot of page showing empty bar? Is this iOS or Android or both? |
Actually it looks like it's the page contents fault. If I use the above code to turn off the tabBar and this code in page render
It works fine and the "Bottom Text" shifts to sit at the bottom of the screen when the tabBar is turned off. Do you want me to create a pull request with the above changes? |
Nice. Yeah, send a PR! |
Pull request submitted #152. Unfortunately I can't programmatically turn the tabBar on or off until SetParams works in TabNavigator. I have a pull request for implementing it #132 and it looks like #134 also addresses params issues with TabNavigator. Do you know if you'll be able to merge either of these? |
Cool. Will check both tonight. |
@microwavesafe I added your changes you committed for hiding tab bar and it works great! Thank you so much for adding this very useful option! |
I would like to do the same thing. How do I hide the TabBar when the keyboard is active? |
@ryannewton have you found any way? |
@PolGuixe We ended up putting the tab bar on the bottom for iOS and Android so the keyboard naturally covers up the tab bar. For those looking to do this, add |
if |
Yes. I encountered this issue as well |
I am experiencing the same as @alinz. @ryannewton is it different for you? |
would be nice to get some insight from @satya164 and @ericvicenti if they know any possible solutions. |
@PolGuixe It stays at the bottom for me. We're on Did it ever get covered up for you? |
@ryannewton no. It has always been pushed by the keyboard. |
I believe this has to do with the introduction of this line
in the AndroidManifest.xml file. https://github.com/facebook/react-native/releases/tag/v0.42.3 If you have the line, the tabbar will avoid the keyboard by itself, if you don't have the line it will be covered. At least in my experience. |
@microwavesafe thanks, that was it. it fixes my problem. |
Any plans to support animation? |
I’m also looking for a solution to animate the tab between screens that show or hide it. I get some ugly content jumping otherwise. Do you have plans on supporting it, or a workaround until then? |
Is there a way we can animate the tabBar when hiding yet? or hide the tabBar on a screens componentDidMount? |
I can't think of a scenario a screen would unmount when opening. So it's probably a safe-bet to always call onClose. Fixes #136
I can't think of a scenario a screen would unmount when opening. So it's probably a safe-bet to always call onClose. Fixes react-navigation#136
With DrawerNavigation we get two nice routes
In my app I would like to hide the TabBar while the keyboard is shown and the above functionality would be very useful. Is it something you would consider a pull request for, or is there a better way of doing it that I haven't spotted?
The text was updated successfully, but these errors were encountered: