-1
我使用基于本机的组件来创建卡片。 但是,我发现在显示带有文本的图标时出现问题。我想是这样显示的:文字无法正确显示图标
,但我得到这个结果:
这是我的代码:
<Card style= {{ flex: 1 , width : width-30 , marginTop :10}}>
<CardItem cardBody>
<Image source= { require('./images/post-media/1.png') } style={{height: 200, width: null, flex: 1}}>
</Image>
</CardItem>
<CardItem style = {{backgroundColor: 'white'}}>
<Body>
<Text style= {styles.txt}>
this is my text blabla blabla blabla
</Text>
<View style={{ borderBottomWidth: 1, borderBottomColor: '#839fcc', width: width-70 }} />
</Body>
</CardItem>
<CardItem >
<Left>
<Button transparent>
<Icon name="time" style={styles.icon} />
<Text>2017.07.05 </Text>
</Button>
</Left>
<Body>
<Button transparent >
<Icon name="heart" style={styles.icon} />
<Text >325</Text>
</Button>
</Body>
<Right>
<Icon name="chatbubbles" style={styles.activeIcon} />
<Text>325</Text>
</Right>
</CardItem>
</Card>
对于风格:
icon: {
color: '#839fcc'
},
activeIcon:{
color:'#0d5be9'
}
有什么想法吗?
我的问题是图标和文本之间的空间。我要删除它 –
给我完整的代码...我认为你的意思是等等等等文本,但是不存在于你的代码中。 –
我编辑了我的代码。请检查它 –