Android with a few touches in xml shortcut

I am trying to achieve that there are effectively 2 hits on the rectangle in an element <shape>in the xroid file. A dark green outer line and a light green inner line with a gradient fill the center of it all. Currently my code is as follows:

<layer-list xmlns:android="http://schemas.android.com/apk/res/android">



<item>
    <shape xmlns:android="http://schemas.android.com/apk/res/android"
        android:shape="rectangle">

        <stroke android:width="3px" android:color="#477135" />
    </shape>

</item>
<item >
    <shape xmlns:android="http://schemas.android.com/apk/res/android"
        android:shape="rectangle">
        <gradient android:startColor="#81c557" android:endColor="#539942"
            android:angle="270" />

        <stroke android:width="1px" android:color="#a8d78a" />
    </shape>
</item>

I tried to apply android: top = "3px" android: bottom = "3px" to the element of the 2nd element, but when I add the right and left attributes, the whole thing is not displayed. Please note that all this is done in ListView.

+5
source share
1 answer

, , . , . , , ImageView, , 1dip, src ImageView drawable , . , ...

+1

All Articles