mercredi 24 février 2016

Android Studio XML Drawable Selector Not Displaying An Item

I'm having an issue with my custom checkbox in that the selector does not show the white rounded rectangle with a yellow stroke when unchecked?

<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://ift.tt/nIICcg">
    <item android:state_checked="true">
        <layer-list>
            <item>
                <shape android:shape="rectangle">
                    <solid android:color="#ffffff" />
                    <stroke android:width="4px" android:color="@color/colourAccent" />
                    <size android:width="36dp" android:height="36dp" />
                    <corners android:radius="2dp" />
                </shape>
            </item>
            <item>
                <vector
                    android:width="24dp"
                    android:height="24dp"
                    android:viewportWidth="24.0"
                    android:viewportHeight="24.0">
                    <path
                        android:fillColor="@color/colourAccent"
                        android:pathData="M9,16.17L4.83,12l-1.42,1.41L9,19 21,7l-1.41,-1.41z"/>
                </vector>
            </item>
        </layer-list>
    </item>
    <item>
        <shape android:shape="rectangle">
            <solid android:color="#ffffff" />
            <stroke android:width="4px" android:color="@color/colourAccent" />
            <corners android:radius="2dp" />
            <size android:width="36dp" android:height="36dp" />
        </shape>
    </item>
</selector>

For the life of me I am unable to figure out the issue nor discover the fix




Aucun commentaire:

Enregistrer un commentaire