我在react导航的react原生应用程序中使用TabNavigator,这是我的tabNavigator:
TabNavigator({
Newsstand: { screen: Newsstand }
}, {
tabBarComponent: NavigationComponent,
tabBarPosition: 'bottom',
tabBarOptions: {
bottomNavigationOptions: {
labelColor: 'white',
rippleColor: 'white',
tabs: {
Newsstand: {
barBackgroundColor: '#2F4F4F',
}
}
}
}
})现在的问题是,当我在我的应用程序中输入时,我希望它不会出现在键盘顶部。我该怎么做呢?
我希望能够将它添加到滚动视图中,这样它就不会跳到键盘顶部,而是固定在键盘后面的底部
发布于 2017-05-11 11:16:05
正如their docs所说,你可以用以下方式隐藏它:
let tabBarHeight = 0;
<TabNavigator
tabBarStyle={{ height: tabBarHeight, overflow: 'hidden' }}
sceneStyle={{ paddingBottom: tabBarHeight }}
/>你试过了吗?
this.state = {
tabHeight: 50,
...
}在你的TabNavigator中:
...height: this.state.tabHeight, ...然后用设置状态
this.setState({tabHeight: 0});发布于 2021-01-31 01:50:05
添加
"android":{"softwareKeyboardLayoutMode": "pan"}在你的app.json中
或
android:softwareKeyboardLayoutMode="pan",在您的清单中
https://stackoverflow.com/questions/43904041
复制相似问题