文本不会显示在嵌套在AbsoluteLayout

时间:2018-05-03 12:01:42

标签: android html5 typescript nativescript

我正在构建一个组件来向用户显示水平堆叠的个人资料图片。 在用户没有个人资料照片的情况下,他的第一个姓名字母将显示在堆栈内的气泡中。

我很难在泡泡中显示文字。 气泡的容器是一个带圆圈类的布局,里面是一个包含文本的标签。

非常感谢这方面的任何帮助,因为它让我筋疲力尽: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>

Attached a view of the ui

0 个答案:

没有答案