Xamarin Android-TextView中的白色文本显示为灰色而不是白色

问题描述 投票:0回答:1

我正在使用TextView并将文本指定为白色,但在VS预览窗口和设备上始终显示为灰色。

为什么会这样,需要进行哪些更改才能使其显示为白色?

    <LinearLayout
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:layout_alignParentTop="true"
    android:layout_marginTop="10dp"
    >
    <TextView

        android:id="@+id/textviewLatLonEtc"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:gravity="center_horizontal"
        android:layout_gravity="top"
        android:background="#00000000"
        android:textColor="#FFFFFFFF"
        android:textAppearance="?android:attr/textAppearanceSmall"
        android:text="UTC Latitude Longitude Altitude Grid HorizontalVariance"



    />
 </LinearLayout>

[注意-我确实注意到,如果我使结尾的LinearLayout标记拼写错误,例如/ Blah,则Visual Studio预览窗口会将文本显示为白色,而不是灰色。

有些怪异的设置继承太多了吗?期待对此的解决方案。

android xamarin textview textcolor
1个回答
0
投票

OK,哦,发现问题了。逐段重建页面后,我发现我有一个辅助视图,其透明度为#80000000(半透明),因此一半的值都可以通过。

我将其更改为#00000000,并且显示了白色的全部亮度。

© www.soinside.com 2019 - 2024. All rights reserved.