我想设置我的按钮样式这种方式,它会在我的视图中传播。 目前,它的左侧和我的按钮的底部产生白色边框(详见附截图)。
我的代码:
let {width, height} = Dimensions.get('window');
let photoWidth = width/4;
return (
<View style={{width: width, height: 500}}>
<ScrollView style={{width: width, height: height}}>
<View style={{flexDirection: 'row', width: width, flexWrap: 'wrap'}}>
{
this.state.photos.map((p, i) => {
return (
<SelectedPhoto
key={i}
index={i}
style={{
width: photoWidth,
height: photoWidth,
}}
limit={this.state.supportLength}
photo={p}
onSelectPhoto={this.onSelectPhoto}
onDeselectPhoto={this.onDeselectPhoto}
/>
);
})
}
</View>
</ScrollView>
<View style={{ flexDirection:"row", flexWrap: 'wrap', width: width }}>
<Button
onPress={this.onNext}
containerViewStyle={{width: width}}
backgroundColor={Colors.red}
title='NEXT' />
</View>
</View>
);