gpt4 book ai didi

Android textview 包装自定义 View

转载 作者:行者123 更新时间:2023-11-30 01:23:52 26 4
gpt4 key购买 nike

<分区>

我有 TextView 和名为 StarRating 的自定义 View 。

有代码 fragment :

<RelativeLayout
android:id="@+id/flowtextView"
android:layout_width="match_parent"
android:layout_height="wrap_content">

<com.app.views.StarRating
android:id="@+id/star_rating"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />

<TextView
android:id="@+id/label"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/_2sdp"
android:text="by Legacy Reviewer, April 11, 2014 from Chicago IL"
android:textSize="12sp"
android:layout_alignParentTop="true"
android:layout_toEndOf="@+id/star_rating" />
</RelativeLayout>

实际结果: enter image description here

预期结果:

enter image description here

问题是 TextView 没有包装 StarRating...

我该怎么做?

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com