着色在OS版本5.0.1上不起作用,使用它作为TextView的背景

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

我正在使用android:background="@drawable/fancy_oval",并且在5.0.1(API 21)的设备上未显示颜色。

这里是fancy_oval.xml

<shape xmlns:android="http://schemas.android.com/apk/res/android"
    android:shape="oval"
    android:tint="#f2f2">
    <size
        android:width="10sp"
        android:height="10sp" />
</shape>

当我设置此背景为白色时,而不是分配给xml的颜色。

知道为什么吗?

android android-5.0-lollipop android-drawable
1个回答
0
投票

在Android中,

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