android - 文本不会显示在嵌套在 AbsoluteLayout 中的标签内
问题描述
我正在构建一个组件来显示水平堆叠的用户个人资料图片。在用户没有个人资料照片的情况下,他的第一个姓名字母将显示在堆栈内的气泡中。
我很难显示气泡内的文字。气泡的容器是一个带有圆形类的布局,其中包含一个包含文本的标签。
非常感谢这方面的任何帮助,因为它让我筋疲力尽:XXX
代码:
<AbsoluteLayout orientation="horizontal" style="background-color: #00fdd6">
<ng-template ngFor let-user [ngForOf]="users|limit:lengthLimit" let-i="index">
<Image *ngIf="user.profile_photo" [src]="getImageUrl(user)" class="img-circle" height="50" width="50"
left="{{stackProfilePhotos(i)}}"></Image>
<RelativeLayout *ngIf="!user.profile_photo" style="border: #0000fe 5px solid; background-color: green;"
class="img-circle" height="100" width="100" top="-25" left="{{stackProfileLetterBubble(i)}}">
<Label text="M" HorizontalOptions="CenterAndExpand" VerticalOptions="Center" TextColor="White" FontSize="24"></Label>
</RelativeLayout>
</ng-template>
解决方案
推荐阅读
- deployment - 如何打包 odoo 模块以安装它而不提供读取源代码的权限?
- macos - OMNeT++ 使用 Qt 配置错误:“配置:错误:无法构建 Qt 应用程序”
- json - Gulp - 删除 JSON 中的所有键,但有异常
- java - 通过 JS 在 datetimelocal 中的日期中添加一定天数,在时间中添加一定小时数
- php - 使用 Symfony 5 和 APIplatform 在 POST_WRITE 事件上插入教义
- python - 为请求格式化 Python 字符串有效负载值
- javascript - 使用本地存储中的数组动态创建 HTML
- java - 避免空同步块的正确方法是什么?
- python - 如何通过 Python 中的多处理模块通过聚合应用分组
- javascript - 如何在 NextJS 中读取 FormData