Sunday, 1 March 2015

Change shape in layer-list programatically



i have this drawable file :



<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://ift.tt/nIICcg">

<item
android:left="6dp"
android:right="6dp"
android:top="6dp"
android:bottom="6dp"

>
<shape android:shape="oval">
<size android:width="170dp"
android:height="170dp"/>
<solid android:color="@color/primaryColor"/>
</shape>
</item>

<item
android:left="18dp"
android:right="18dp"
android:top="18dp"
android:bottom="18dp">

<shape android:shape="oval" >
<size android:width="140dp"
android:height="140dp"/>
<solid android:color="#EEEEEE"/>
</shape>
</item>


<item
android:left="30dp"
android:right="30dp"
android:top="30dp"
android:bottom="30dp">

<shape android:shape="oval" >
<size android:width="140dp"
android:height="140dp"/>
<solid android:color="@color/primaryColor"/>
</shape>
</item>


</layer-list>


and i want to change the shape of only one oval programatically but i found nothing do to this.I want to change only one shape not all at the same time.


I made lot of research but nothing explain how to do this.


So please help me


No comments:

Post a Comment