gpt4 book ai didi

android - 我的应用程序在 Nexus 4 Lollipop 设备上不显示除黑色和白色之外的文本颜色

转载 作者:行者123 更新时间:2023-12-02 15:54:58 24 4
gpt4 key购买 nike

我的应用程序在 Nexus 4 Lollipop 设备上不显示除黑色和白色之外的文本颜色。我的应用程序仅包含一个带有 hello world 红色文本的 TextView 。但它在我的设备上显示为黑色。

模拟器显示红色“Hello world!”但我的设备以黑色显示它......无论我选择什么颜色,我的 Nexus 4 Lollipop 设备都以黑色显示它......抱歉,我是新来的,所以我还不能发布图像。

这是我的 xml 代码:

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingBottom="@dimen/activity_vertical_margin"
tools:context=".MainActivity">

<TextView
android:text="@string/hello_world"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/textView"
android:textColor="#f00"
android:textSize="40sp"
android:gravity="center"/>

</RelativeLayout>

最佳答案

尝试使用

android:textColor="#ffff0000"

而不是

android:textColor="#f00"

关于android - 我的应用程序在 Nexus 4 Lollipop 设备上不显示除黑色和白色之外的文本颜色,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29470202/

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