Android state_selected不再四舍五入了吗?

时间:2019-02-16 20:55:03

标签: android

该选择器曾经起作用,但是当我最近打开项目时,我注意到此UI错误,其中选定状态不再舍入。有什么想法吗?

<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">

    <item android:drawable="@drawable/tab_indicator_selected"
        android:state_selected="true"/>

    <item android:drawable="@drawable/tab_indicator_default"/>
</selector>


<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
    <item>
        <shape
            android:innerRadius="0dp"
            android:shape="ring"
            android:thickness="2dp"
            android:useLevel="false">
            <solid android:color="@android:color/darker_gray"/>
        </shape>
    </item>
</layer-list>


[![<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
    android:innerRadius="0dp"
    android:shape="ring"
    android:thickness="5dp"
    android:useLevel="false">
    <solid android:color="@color/chuck_colorAccent"/>
</shape>

enter image description here

0 个答案:

没有答案