2

嗨我想实现以下风格:

在此处输入图像描述

但是使用以下代码,我在单独的列中获得了一个图标,在另一列中获得了文本

<View style={{flex:1, flexDirection:'row'}}>
  <Icon height={10} width={10} />
  <Text>It is a long established fact that a reader will be distracted by the readable 
    content of a page when looking at its layout. The point of using Lorem Ipsum is that it 
    has a more-or-less normal distribution of letters, as opposed to using 'Content here, 
    content here'
</Text>
</View>

在此处输入图像描述

请忽略不同的图标。这个问题有什么解决办法吗?

4

1 回答 1

4

实际上,您可以在文本中嵌入图标,如下所示:

<View style={{flex:1, flexDirection:'row'}}>
  <Text>
    <Icon height={10} width={10} />
    It is a long established fact that a reader will be distracted by the readable 
    content of a page when looking at its layout. The point of using Lorem Ipsum is that it 
    has a more-or-less normal distribution of letters, as opposed to using 
    'Content here, content here'
  </Text>
</View>
于 2019-12-14T13:07:34.700 回答