0
私の人生では、このテキスト入力を絶対に画面の下部に表示することはできません。React Native:絶対ボトムテキスト入力
これは私の非常に基本的な設定です:
class Chat extends Component {
render() {
return (
<View style={styles.container}>
<View style={styles.content}>
<Text>Test</Text>
</View>
<View style={styles.footer}>
<Text>Meow</Text>
</View>
</View>
);
}
}
const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: "#F5F5F5",
...Platform.select({
ios: { paddingTop: 30 }
}),
},
content: {
flex: 1,
},
footer: {
borderWidth: 1,
borderColor: '#ccc',
padding:10,
position: 'absolute',
flex:0.1,
left: 0,
right: 0,
bottom: 0,
}
}
私も一定の高さにフッターのflex属性を切り替えてみた:80、私はまだ同じ出力を得ます。フッターを一番下に置くにはどうすればいいですか?
これはリアクションナビゲーションを使用していることに注意してください。これはStackNavigator画面です。重要であるかどうかはわかりません。
これは私がshoutem uiを使用しているためです。 TextおよびViewコンポーネントのインポートを、ネイティブの反応に戻すと、それは正常に動作しているようです... – AlxVallejo
[this](http://shoutem.github.io/docs/ui-toolkit/components/typography)にチェックを入れてください。 Textコンポーネントのドキュメントと、Shoutem UI Toolkitを使用する場合のViewコンポーネントの[this](http://shoutem.github.io/docs/ui-toolkit/components/view)ドキュメント。 –