React native 使用复选框列表样式问题响应本机模型弹出窗口
我使用react native multiple select复选框列表在模型上弹出复选框列表,但它需要全屏高度。我无法解决此问题。请任何人帮助我 下面是我的模型弹出代码React native 使用复选框列表样式问题响应本机模型弹出窗口,react-native,React Native,我使用react native multiple select复选框列表在模型上弹出复选框列表,但它需要全屏高度。我无法解决此问题。请任何人帮助我 下面是我的模型弹出代码 [![<Modal animationType="slide" transparent={true} visible={this.state.modalVisible} onRequestClose={() => {
[![<Modal
animationType="slide"
transparent={true}
visible={this.state.modalVisible}
onRequestClose={() => {
Alert.alert("Modal has been closed.");
}}
>
<View style={styles.ModalcenteredView}>
<View style={styles.ModalView}>
<View style={{height:'30%'}}>
<SelectMultiple
items={this.state.ParticipantCheckBox}
// renderLabel={renderLabel}
selectedItems={this.state.selectedFamilyMembers}
onSelectionsChange={this.SelectFamilyMembers} />
</View>
<View style={{flex:1, flexDirection:'row', flex:1,height:'1%'}}>
<TouchableHighlight style={{height:'5%'},\[styles.ModalCloseButton\] }
onPress={() => {
this.HideShowFamilyMemberModel(false);
}}
>
<Text style={styles.ModalCloseButtonTextStyle}>Close</Text>
</TouchableHighlight>
<TouchableHighlight style={{height:'5%'},\[styles.ModalSaveButton\] }
onPress={() => {
this.SaveFamilyMemberModel(false);
}}
>
<Text style={styles.ModalSaveButtonTextStyle}>Save</Text>
</TouchableHighlight>
</View>
</View>
</View>
</Modal>][1]][1]
[![{
警报。警报(“模式已关闭”);
}}
>
{
此.HideShowFamilyMemberModel(false);
}}
>
接近
{
此.SaveFamilyMemberModel(false);
}}
>
拯救
][1]][1]
您可以这样创建您的模式
<Modal>
//this is parent view
<View>
//set this vide at the center of parent view and set height 40% or 30%
<View>
<ScrollView>
…
...
</ScrollView>
</View>
</View>
</Modal>
//这是父视图
//将此视频设置在父视图的中心,并将高度设置为40%或30%
…
...
您希望得到什么?