gpt4 book ai didi

Android TextView 未显示

转载 作者:行者123 更新时间:2023-11-29 15:57:35 26 4
gpt4 key购买 nike

我已经调试过了,一切正常;此外,在图形布局中一切都很好。在这里你可以看到代码:

<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingTop="5dp"
android:paddingBottom="10dp"
android:background="@color/white" >

<ImageView
android:id="@+id/image"
android:layout_width="70dp"
android:layout_height="70dp"
android:layout_marginStart="5dp"
android:src="@drawable/news_img1" />

<TextView
android:id="@+id/title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="10dp"
android:layout_alignParentTop="true"
android:layout_toEndOf="@id/image"
android:text="Pizza Rondon"
android:textSize="16sp"
android:textStyle="bold" />

<TextView
android:id="@+id/description"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/title"
android:layout_marginEnd="10dp"
android:layout_marginStart="10dp"
android:layout_toEndOf="@id/image"
android:text="Ingredients: meat, potato, tomato, salad included too. " />

<TextView
android:id="@+id/price"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_marginEnd="20dp"
android:text="60 Lei"
android:textColor="@color/dimmed_red"
android:textStyle="bold" />
</RelativeLayout>

这是结果,因为此 View 是 ExpandableListView 中的一个项目:

enter image description here

我没有在我的 customAdapter 中为 TextViews 设置任何数据。什么会导致 TextView 消失?我什至看不出价格和其他两个没有显示的价格有什么区别,它们在布局上差别不大。

最佳答案

您是否尝试过更改文本颜色 - 也许它设置为白色???显示价格是因为 android:textColor="@color/dimmed_red"

关于Android TextView 未显示,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27139590/

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