小编Nit*_*ish的帖子

react native android中GIF图像的圆角问题

我是 React Native 的新手,我在列表视图中显示了一个 GIF 图像列表,我尝试用普通图像执行此操作,并且它正在工作,但是对于 GIF 图像,它不起作用我现在不知道为什么。

我使用以下样式和代码使角变圆。

  <ListView contentContainerStyle={styles.list}
  showsHorizontalScrollIndicator={false}
  horizontal= { true }
  dataSource={this.state.dataSource}
   ref={ref => this.listView = ref}
  renderRow={(rowData) => {
    return (
      <TouchableOpacity style={styles.item} onPress={() => this.stickerSelected(rowData)}>
          <Image style={styles.image} source={this.props.images[rowData].src}/>
      </TouchableOpacity>
    )
  }}
  />



list: {
justifyContent: 'center',
flexDirection: 'column',
backgroundColor: '#FFFDEB',
flexWrap: 'wrap',
paddingLeft: 6,
paddingRight: 6


},
  item: {
    justifyContent: 'center',
    alignItems: 'center',
    backgroundColor: '#EAD62F',
    borderRadius: 10,
    margin: 3,
    width: 75,
    height: 75,
  },
  image: {
    width: 75,
    height: 75,
    borderRadius: 10,
  } …
Run Code Online (Sandbox Code Playgroud)

android gif react-native

3
推荐指数
1
解决办法
2279
查看次数

标签 统计

android ×1

gif ×1

react-native ×1