[英]How can I make my card view littile circular in react native
//
In below code I am trying to make on ui according to my ux design .在下面的代码中,我试图根据我的 ux 设计在 ui 上制作。 But One problem i am facing is not able to make card like same in ux , in ux its someting circular ,but in my code its not coming.但是我面临的一个问题是无法在 ux 中制作相同的卡片,在 ux 中它是某种循环,但在我的代码中它不会出现。 It tried with border radius also .它也尝试使用边界半径。 Please suggest where I am wrong请建议我错在哪里
<View style={{ marginBottom: 10, marginLeft: 5, marginRight: 5, borderRadius: 2, padding: 10 }} >
<Card >
<CardItem header style={{ flexDirection: 'row', backgroundColor: '#fff', width: '100%', justifyContent: 'space-between', borderBottomColor: '#f1f1f1', borderBottomWidth: 1,borderRadius: 80 }}>
<View style={{paddingTop:10 }}>
<RegularText text={`${'Wallet Balance'}`} textColor='grey'style={{ fontWeight: 'bold', flexWrap: 'wrap',color:'grey' }} />
</View>
<View style = {{ width : wp('10%'),height: wp('10%'),backgroundColor : '#E091C9' ,borderRadius : hp('1%'), margin : 8,flexDirection :'row',justifyContent :'center',alignItems : 'center'}}>
<SvgCss xml={WALLET} width={15} height={15} />
</View>
<View style={{
flexDirection: 'column',
height: 25, paddingRight: 10, paddingLeft: 10, paddingTop: 5,paddingBottom:30}}>
<SmallText text={'MUR 110.00'} textColor='red' />
<SmallText text={'Add Money'} textColor='blue' />
</View>
</CardItem>
<View style = {{flexDirection : 'row',paddingLeft:24,paddingRight:24}}>
{info.tecnologies.map(
(data, index) => {
return (
<View>
<View style = {{width : wp('14%'),height: wp('14%'),backgroundColor : 'rgb(163, 153, 233)',borderRadius : hp('2%'), margin : 10,flexDirection :'row',justifyContent :'center',alignItems : 'center'}}>
<SvgCss xml={PAY_BILL} width={15} height={15} />
</View>
<View style={{paddingLeft:15,paddingBottom:15}}>
<SmallText text={'Pay Bill'} textColor='grey' />
</View>
</View>
)
}
)}
</View>
</Card>
</View>
You should try this :你应该试试这个:
<View style={{ marginBottom: 10, marginLeft: 5, marginRight: 5, borderRadius: 2, padding: 10 }} >
<Card style={{ borderRadius: 8 }}>
<CardItem header style={{ flexDirection: 'row', backgroundColor: '#fff', width: '100%', justifyContent: 'space-between', borderBottomColor: '#f1f1f1', borderBottomWidth: 1,borderRadius: 80 }}>
<View style={{paddingTop:10 }}>
<RegularText text={`${'Wallet Balance'}`} textColor='grey'style={{ fontWeight: 'bold', flexWrap: 'wrap',color:'grey' }} />
</View>
<View style = {{ width : wp('10%'),height: wp('10%'),backgroundColor : '#E091C9' ,borderRadius : hp('1%'), margin : 8,flexDirection :'row',justifyContent :'center',alignItems : 'center'}}>
<SvgCss xml={WALLET} width={15} height={15} />
</View>
<View style={{
flexDirection: 'column',
height: 25, paddingRight: 10, paddingLeft: 10, paddingTop: 5,paddingBottom:30}}>
<SmallText text={'MUR 110.00'} textColor='red' />
<SmallText text={'Add Money'} textColor='blue' />
</View>
</CardItem>
<View style = {{flexDirection : 'row',paddingLeft:24,paddingRight:24}}>
{info.tecnologies.map(
(data, index) => {
return (
<View>
<View style = {{width : wp('14%'),height: wp('14%'),backgroundColor : 'rgb(163, 153, 233)',borderRadius : hp('2%'), margin : 10,flexDirection :'row',justifyContent :'center',alignItems : 'center'}}>
<SvgCss xml={PAY_BILL} width={15} height={15} />
</View>
<View style={{paddingLeft:15,paddingBottom:15}}>
<SmallText text={'Pay Bill'} textColor='grey' />
</View>
</View>
)
}
)}
</View>
</Card>
</View>
For your another question :对于您的另一个问题:
<View style={{ marginBottom: 10, marginLeft: 5, marginRight: 5, borderRadius: 2, padding: 10 }} >
<Card style={{ borderRadius: 8 }}>
<CardItem header style={{ flexDirection: 'row', backgroundColor: '#fff', width: '100%', justifyContent: 'space-between', borderBottomColor: '#f1f1f1', borderBottomWidth: 1,borderRadius: 80 }}>
<View style={{paddingTop:10 }}>
<RegularText text={`${'Wallet Balance'}`} textColor='grey'style={{ fontWeight: 'bold', flexWrap: 'wrap',color:'grey' }} />
</View>
<View style = {{ width : wp('10%'),height: wp('10%'),backgroundColor : '#E091C9' ,borderRadius : hp('1%'), margin : 8,flexDirection :'row',justifyContent :'center',alignItems : 'center', alignSelf : 'flex-end'}}>
<SvgCss xml={WALLET} width={15} height={15} />
<View style={{
flexDirection: 'column',
height: 25, paddingRight: 10, paddingLeft: 10, paddingTop: 5,paddingBottom:30}}>
<SmallText text={'MUR 110.00'} textColor='red' />
<SmallText text={'Add Money'} textColor='blue' />
</View>
</View>
</CardItem>
<View style = {{flexDirection : 'row',paddingLeft:24,paddingRight:24}}>
{info.tecnologies.map(
(data, index) => {
return (
<View>
<View style = {{width : wp('14%'),height: wp('14%'),backgroundColor : 'rgb(163, 153, 233)',borderRadius : hp('2%'), margin : 10,flexDirection :'row',justifyContent :'center',alignItems : 'center'}}>
<SvgCss xml={PAY_BILL} width={15} height={15} />
</View>
<View style={{paddingLeft:15,paddingBottom:15}}>
<SmallText text={'Pay Bill'} textColor='grey' />
</View>
</View>
)
}
)}
</View>
</Card>
</View>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.