当我使用反应本地按钮,我不能STRETCH时它,打击的是,我使用的按钮如何拉伸按钮完全填充容器
myButtonStyle: {
flex: 1,
borderRadius: 5,
alignSelf: 'stretch',
backgroundColor: 5,
borderWidth: 1,
borderColor: '#007aff',
marginRight: 5,
marginLeft: 5
}
和按钮本身的风格:
<Button
style={myButtonStyle}
title="Learn More"
color="#841584"
accessibilityLabel="Learn more about this purple button"
/>
,这是按钮包装的风格
myCardSectioStyle: {
borderBottomWidth: 4,
padding: 5,
backgroundColor: '#ffff00',
justifyContent: 'flex-start',
flexDirection: 'row',
borderColor: '#6600ff',
position: 'relative'
}
我们可以看到按钮坐落在父容器的样式吗? – Ohgodwhy
@Ohgodwhy我做了 – farmcommand2