Praveen Praveen - 1 year ago 153
Android Question

Border for an Image view in Android?

How can I set a border for an

and change its color in Android?

Answer Source

I set the below xml to the background of the Image View as Drawable. It works.

<?xml version="1.0" encoding="UTF-8"?>
<shape xmlns:android="">
<solid android:color="#FFFFFF" />
<stroke android:width="1dp" android:color="#000000" />
<padding android:left="1dp" android:top="1dp" android:right="1dp"
    android:bottom="1dp" />
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download