reactjs - 无法在平面列表中呈现功能图标 - React Native
问题描述
图标没有出现。警报正在工作。无法在平面列表中呈现功能图标。请帮忙。我需要你的帮助。
我的代码:
<FlatList
data={this.state.data}
//extraData={}
keyExtractor={(item, index) => {
return index.toString();
}}
renderItem={({ item }) =>
<View style={styles.cartView}>
<TouchableOpacity style={styles.touchView} onPress={() => Linking.openURL(item.app_link)}>
<Image style={styles.cartLogo} source={{ uri: item.app_resim }} />
</TouchableOpacity>
<Text style={styles.mainViewText}>{item.app_name}</Text>
<View style={styles.mainViewAltBar}>
<TouchableOpacity >
<Icon name="refresh-outline" size={30} color="#404040" />
</TouchableOpacity>
{this.appSet(item.app_namep)}
</View>
</View>
} />
appSet(value){
AppInstalledChecker.isAppInstalledAndroid(value)
.then((isInstalled) => {//not show icons but alert working
if (isInstalled) {
return (<Icon name="checkmark-outline" size={30} color="#404040" />);
} else {
return (<Icon name="close-outline" size={30} color="#404040" />);
//alert(isInstalled);
}
})
}
谢谢你。
解决方案
推荐阅读
- flutter - 使用 Google 登录帐户的 GoogleAPI
- angular - 模块构建失败(来自 ./node_modules/sass-loader/dist/cjs.js)
- yaml - Linter 在 IF-ELSE-IF 分支的 kubernetes configmap.yaml 上给出错误
- ionic4 - URL SegmentError:无法匹配 ionic4 中的任何路由
- internet-explorer - 从 javascript 代码调用 Activex 按钮
- docker - 语义错误:找不到本地“set32”
- javascript - 在字段数上也是多态的泛型元组的类型是什么?
- java - Java scoket DataInput 在缓冲区已满之前不会读取
- php - Laravel 7 更改身份验证表单的语言
- .net - .Net 调用 WCF 端点错误 - 加载 OperationContractAttribute 时出错