XML : Change thickness programmatically

HI I am developing an application for Android. In my activity it contains one Relative layout. I want to set the ring type background. So I use the following code.

  <?xml version="1.0" encoding="utf-8"?>  <shape xmlns:android="http://schemas.android.com/apk/res/android"      android:shape="ring"      android:innerRadius="0dp"      android:thickness="200dp"      android:useLevel="false">      <solid          android:color="#0f000000"/>      <corners          android:radius="10dp" />    </shape>    

It is working fine. Now I want to change the thickness in above code programmatically. How can I change this?

No comments:

Post a Comment