OGeek|极客世界-中国程序员成长平台

标题: javascript - react-native 图标位于 View 下 [打印本页]

作者: 菜鸟教程小白    时间: 2022-12-12 14:45
标题: javascript - react-native 图标位于 View 下

图标在 Android 中属于“ View ”,但在 ios 中有效。我尝试了 overflow: 'visible'elevation: 887879778zIndex: 564654687 但没有任何帮助。


截图如下:


example snack



Best Answer-推荐答案


这种结构可以正常工作。 将该 View 放在父 View 中并与填充一起使用。

<View style={{ padding: 18 }}>
  <View style={styles.left}>
   <Text style={{ color: 'white' }}>Left</Text>
  </View>
  <View style={styles.icon}>
   <Icon type="Feather" name="check" />
  </View>
</View>

当然不是出色的解决方案,但适合这个问题

关于javascript - react-native 图标位于 View 下,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51056262/






欢迎光临 OGeek|极客世界-中国程序员成长平台 (http://ogeek.cn/) Powered by Discuz! X3.4