Share Coding

Tutorials, Problems, Stuffs …

Set Border to Android ImageView

Create a layout xml file in res/drawable:

<?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" /></shape>

Add the background to imageview:


By programmatically:


4 responses to “Set Border to Android ImageView

  1. Karma Thronton 2012/03/04 at 9:22 am

    All that we are is the production of what we have consideration. Wait� Has anyone suggested dissertation help to you. Keep the articles arriving! thanks from to train a dog

  2. Candra Baldearena 2012/03/04 at 9:25 am

    Excellent article I enjoy reading your articles.thanks from to train a dog

  3. Buster Venuto 2012/03/04 at 9:47 am

    This is what i was looking for, awsome content .thanks from to train a dog

  4. Pingback: [Android] Split line or one side border | Share Coding

Leave a Reply

Please log in using one of these methods to post your comment: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: