React Nativeを使用してフッターを設定する方法をスタックオーバーフローで検索しました。 と私は私が続くソリューションReactネイティブのflexBoxフッターが機能しない
https://stackoverflow.com/a/31249011/8226957
を発見し、ビューをrootにstyle={{flex: 1}}
を置くが、それは動作しません。
<View style={{flex: 1}}>
<ScrollView>
<FlatList
data={this.state.datas}
renderItem={({item}) =>
<TouchableOpacity onPress={() => {this._deleteKeyFromAsyncStorage(item.key)}}>
<Text style={styles.item}>
{item.value}
</Text>
</TouchableOpacity>
}
/>
</ScrollView>
<View>
<TextInput
style={{height: 40, borderColor: 'gray', borderWidth: 1}}
onChangeText={(text) => this.setState({text})}
value={this.state.text}
/>
<TouchableOpacity onPress={this._onAddButton}>
<View style={{
height: 50,
backgroundColor: 'steelblue',
alignItems: 'center',
justifyContent: 'center',
}}>
<Text style={{textAlign: 'auto'}}>ADD</Text>
</View>
</TouchableOpacity>
</View>
</View>
私がそれに従うと、私は消えたリストを見る。 どうすればこの問題を解決できますか?
あなたはそれを見たいと思うものの簡単なスケッチを追加できますか?または他のアプリの例 –
@RyanTurnbull textInputとButton(フッター)が画面下部に固定されています。 https://i.stack.imgur.com/MnheG.png(このように) –