css - 反应原生对齐图像与文本
问题描述
在 react native 上,我已经用标签 View 包装了图像。代码如下
<View style={{ flexDirection: 'row', marginTop: 3, alignItems:'center' }}>
<Image source={Images.rank} style={{ width: 20, height: 20 }}></Image>
<Text style={[mainstyle.textGrey, mainstyle.fs14, mainstyle.ml5,]}>
{I18n.t('Rank')}:
<Text onPress={() => this._goto('Rank')}
style={[mainstyle.textRed, mainstyle.fs14, mainstyle.bold,
mainstyle.textUnderline]}>
{this.state.monthRank == '' ?
'-' : this.state.monthRank}
</Text>
</Text>
</View>
解决方案
推荐阅读
- r - 在 R 的网格中将绘图与 Cowplot 对齐
- mysql - 在使用 MySQL 触发器更新同一表中的行时插入新行
- javascript - 如何将文本替换为由 wordpress 插件生成的链接?
- java - 在使用 JUnit、Spring 4 和 Vaadin 对类进行单元测试时获取 NPE
- android - 无法切换飞行模式,浓缩咖啡
- python - 在 for 循环后每行打印一个句子
- javascript - 对 div 元素执行单击
- amazon-web-services - AWS Cognito - 如何从令牌对象获取用户组
- docker - 闪亮的应用程序 docker 容器未在浏览器中加载
- javascript - 在 Angular 应用程序内将远程 Angular 组件加载到 iframe 或使用其他方法?