I am trying to set border on imagview , once i set image on imageview border gets disappeared. Image is overlayed on the whole view. Trying to get image from gallery.
image.xml
<ImageView
android:id="@+id/selectedImage"
android:layout_width="157dp"
android:layout_height="157dp"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true"
android:layout_marginTop="20dp"
android:background="@drawable/border"
/>
border.xml
<?xml version="1.0" encoding="UTF-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android" >
<solid android:color="#FFFFFF" />
<stroke
android:width="2dp"
android:color="#000000" />
<padding
android:bottom="1dp"
android:left="1dp"
android:right="1dp"
android:top="1dp" >
</padding>
Any Help would be Appreciated.
Thanks in Advance.
Set the padding to
ImageViewfewdpand see if you can see the border. Actually remove the padding fromShapeand set the padding toImageView.