react-native - React Native - 设置视图的前景色
问题描述
我想设置这样我就可以实现这样的目标foreground color
-View
例子:
<View style={{ foregroundColor: 'rgba(0, 0, 0, 0.5)' }}>
//...
</View>
解决方案
为什么不使用backgroundColor
?
<View style={{ backgroundColor: 'rgba(0, 0, 0, 0.5)' }}>
// Your red button here
</View>
这将产生预期的结果。
推荐阅读
- postgresql - Postgreql:通过其文件添加数据库
- java - 无法根据第一个 Spinner 值获取第二个 Spinner 值
- akka - 如何在 Kamon(1.x) Datadog 仪表板中显示所有指标的服务名称前缀
- java - 如何使用 SPI 扩展处理与我的 Java 应用程序的版本冲突
- google-apps-script - 如何在另一个函数中使用过滤器函数
- mule - dataweave 中的 mule 过滤器逻辑处理
- javascript - 材料表未反映数据源的更改
- css - Angular Material 选项卡活动链接放置下拉箭头
- android - 如何将尺寸 dp 转换为像素?
- java - 如何以编程方式使 Java 库/Android 服务崩溃或停止?