Now the problem starts only with setting the color of the shape. I created one rectangular shape in drawableand set it to ImageViewas follows
<LinearLayout
android:layout_width="0dp"
android:layout_height="fill_parent"
android:orientation="vertical"
android:layout_weight="0.15"
android:layout_marginRight="10dp"
android:gravity="center_vertical">
<ImageView
android:id="@+id/iv_priority"
android:src="@drawable/case_priority"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
</LinearLayout>
EDIT
My case_priority.xml
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<solid android:color="#009600" />
<size android:width="30dp"
android:height="30dp" />
</shape>
Now I need to change the color of this shape. Actually this color comes from a web service, and I need to change it. So My Question : How can we change the color of this form programmatically. and set it to image view mode. I have done some examples in stackoverflow, but I cannot change it to an image. Please, help!!!! Thanks in advance.
EDIT:
, , . ImageView, , . , , . - , , xml , java . ,.setBackground() . , . .