首页 > 解决方案 > 如何避免我的键盘向上移动我的页脚

问题描述

嘿,我正在使用一个 react native 应用程序,我有一个我自己制作的页脚,但是当我使用键盘时,页脚向上移动到键盘上方和我的平面列表上方,我尝试了类似但它不起作用,我无法更改 android :windowSoftInputMode="adjustResize" 因为我在同一个应用程序中有其他行为

这是我的代码

 render() {
    return (
      <View style={styles.container}>
        {!this.state.search ? (
          <Header/>
        ) : (
          <SearchabalHeader/>
        )}
        <View style={styles.listContainer}>
          <FlatList
            data={this.state.data}
            showsVerticalScrollIndicator={false}
            renderItem={({ item }) => {
              return (
                <Item
                  status={item.status}
                  price={item.price}
                  address={item.address}
                  dateTime={new Date()}
                />
              );
            }}
          />
        </View>
        <View style={styles.footerContainer}>
          <Footer activeTab="tab-2" user={this.props.user} />
        </View>
      </View>
    );
  }
}

我的风格是



StyleSheet.create({
  container: {
    backgroundColor: colors.grey_Three,
    flex: 1,
  },
  listContainer: {
    flex: 1,
    paddingHorizontal: '3%',
    paddingTop: '2%',
  },
  footerContainer: {},
});

标签: react-native

解决方案


推荐阅读