Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/207.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android 在ImageView中显示图像边框_Android_Image - Fatal编程技术网

Android 在ImageView中显示图像边框

Android 在ImageView中显示图像边框,android,image,Android,Image,如何在图像视图中显示图像的边框,我希望在图像的侧面和底部绘制一条带箭头的线条,以显示线条上方文本的长度和宽度。我提到 及 但这两种方法都为图像视图作为一个整体创建了一个边框,而我需要为图像本身创建边框。如果您想在图像视图周围创建边框,可以尝试此方法 您可以使用CirlcleImageView库进行取整ImageView: 编辑这个图书馆 compile 'de.hdodenhof:circleimageview:2.1.0' 在布局中使用如下所示内容 <de.hdodenhof.cir

如何在图像视图中显示图像的边框,我希望在图像的侧面和底部绘制一条带箭头的线条,以显示线条上方文本的长度和宽度。我提到 及
但这两种方法都为图像视图作为一个整体创建了一个边框,而我需要为图像本身创建边框。

如果您想在图像视图周围创建边框,可以尝试此方法

您可以使用
CirlcleImageView
库进行取整
ImageView

编辑这个图书馆

compile 'de.hdodenhof:circleimageview:2.1.0'
在布局中使用如下所示内容

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

有关更多信息,请参见

如果您想在imageview周围添加边框,可以尝试此功能

您可以使用
CirlcleImageView
库进行取整
ImageView

编辑这个图书馆

compile 'de.hdodenhof:circleimageview:2.1.0'
在布局中使用如下所示内容

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

有关更多信息,请参见

你能分享一张图片吗?很容易理解发布什么是需要的?我想在我的图像视图中看到类似于该行的内容。你能分享一张图片吗?很容易理解发布什么是需要的?我想在我的图像视图中看到类似于该行的内容