I don't want the keyboard to push the view up when typing.
(我不希望键盘在键入时将视图向上推。)
There's enough space for the keyboard to not push the overlay but it's still doing it. (键盘有足够的空间不推压覆盖层,但仍在这样做。)
I've tried using keyboardavoidingview positioning and padding in and outside of the overlay but no luck. (我试过在覆盖内外使用Keyboardavoidingview定位和填充,但是没有运气。)
render() {
return (
<Overlay
isVisible={this.state.isVisible}
width="auto"
height="auto"
overlayStyle={{ width: "90%", height: "50%", marginBottom: "70%" }}
>
<View>
<Text>Schedule</Text>
<TextInput
label="Event"
style={{ width: "95%", margin: "3%" }}
theme={{ colors: { primary: Themes.primaryTheme } }}
/>
<TextInput
label="Date & Time"
style={{ width: "95%", margin: "3%" }}
theme={{ colors: { primary: Themes.primaryTheme } }}
/>
<TextInput
label="Location"
style={{ width: "95%", margin: "3%" }}
theme={{ colors: { primary: Themes.primaryTheme } }}
/>
<View style={{ flexDirection: "row" }}>
<Button
mode="text"
style={{ width: "40%", margin: "3%" }}
onPress={() => this.setState({ isVisible: false })}
>
Cancel
</Button>
<Button
mode="contained"
style={{ width: "40%", margin: "3%" }}
onPress={() => this.setState({ isVisible: false })}
>
Create
</Button>
</View>
</View>
</Overlay>
);
}
ask by CLUTCHER translate from so 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…