1

How to display border to image inside an image view,I wish to accomplish something like a line with arrow head on the side and bottom of the image to display the length and breadth in text above the line . I have referred to Is there an easy way to add a border to the top and bottom of an Android View? and Border for an Image view in Android? but both of these create a border for the image view as a whole while I need a border for the image itself .

Vishal Bisht
  • 143
  • 1
  • 1
  • 9

1 Answers1

0

if you want border around imageview you can try this

You can use CirlcleImageView library for rounded ImageView:

compile this libray

compile 'de.hdodenhof:circleimageview:2.1.0'

use like below in your layout

 <de.hdodenhof.circleimageview.CircleImageView
   xmlns:app="http://schemas.android.com/apk/res-auto"
   android:id="@+id/profile_image"
   android:layout_width="96dp"
   android:layout_height="96dp"
   android:src="@drawable/profile"
   app:civ_border_width="2dp"
   app:civ_border_color="#FF000000"/>

for more information follow this link enter image description here

AskNilesh
  • 67,701
  • 16
  • 123
  • 163