Skip to content
This repository has been archived by the owner on Feb 25, 2020. It is now read-only.

feat: hide tab bar when keyboard is shown #112

Merged
merged 1 commit into from
Mar 30, 2019

Conversation

satya164
Copy link
Member

Closes #16

When the statusbar is not translucent, the view resizes when the keyboard is shown on Android. The tab bar stays above the keyboard. This PR makes the tab bar hide automatically when the keyboard is shown.

The behaviour is enabled by default and can be disabled with keyboardHidesTabBar: false in tabBarOptions

ezgif-2-b8a8db1a7b96

@satya164 satya164 requested a review from brentvatne March 29, 2019 16:25
],
// Absolutely position the tab bar so that the content is below it
// This is needed to avoid gap at bottom when the tab bar is hidden
position: this.state.keyboard ? 'absolute' : null,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

by absolutely positioning the tab bar does this mean that screens inside of the tabs need to account for the height of the tabbar, eg: with bottom scroll insets?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@brentvatne this is only when the keyboard is open, the tab bar will translate down and hide, so there's no need to account for it.

@brentvatne
Copy link
Member

very cool 😎

@satya164 satya164 force-pushed the @satya164/keyboard-tab-view branch from b8c2199 to 9548fa2 Compare March 30, 2019 23:03
@satya164 satya164 merged commit 2a1d753 into master Mar 30, 2019
@satya164 satya164 deleted the @satya164/keyboard-tab-view branch March 30, 2019 23:05
satya164 added a commit that referenced this pull request Apr 1, 2019
Closes #16

When the statusbar is not translucent, the view resizes when the keyboard is shown on Android. The tab bar stays above the keyboard. This PR makes the tab bar hide automatically when the keyboard is shown.

The behaviour is enabled by default and can be disabled with `keyboardHidesTabBar: false` in `tabBarOptions`
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants