自定义圆角ImageView
来源:互联网 发布:java项目开发源代码 编辑:程序博客网 时间:2024/06/10 13:35
自定义圆角ImageView,包括任意圆角矩形、圆形、椭圆形、定义图形边框与颜色,进度条等
效果图
gradle引用
compile 'com.lqm:RoundImageView:1.0.0'
示例代码
<?xml version="1.0" encoding="utf-8"?><LinearLayout xmlns:android="http://schemas.android.com/ apk/res/android"xmlns:app="http://schemas.android.com/apk/res-auto"android:layout_width="match_parent"android:layout_height="match_parent"android:gravity="center_horizontal"android:orientation="vertical"><LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="horizontal"> <com.lqm.roundview.RoundImageView android:layout_width="120dp" android:layout_height="120dp" android:layout_margin="10dp" android:scaleType="fitXY" android:src="@mipmap/image_1" app:corner_radius="20dp" /> <com.lqm.roundview.RoundImageView android:layout_width="120dp" android:layout_height="120dp" android:layout_margin="10dp" android:scaleType="fitXY" android:src="@mipmap/image_1" app:rightBottom_corner_radius="20dp" app:rightTop_corner_radius="10dp" /></LinearLayout><LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="horizontal"> <com.lqm.roundview.RoundImageView android:layout_width="120dp" android:layout_height="120dp" android:layout_margin="10dp" android:scaleType="fitXY" android:src="@mipmap/image_2" app:border_color="#68f" app:border_width="5dp" app:type="circle" /> <com.lqm.roundview.RoundImageView android:layout_width="120dp" android:layout_height="80dp" android:scaleType="fitXY" android:src="@mipmap/image_2" app:border_color="#9999" app:border_width="1dp" app:type="oval" /></LinearLayout><LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="horizontal"> <com.lqm.roundview.RoundImageView android:id="@+id/iv_progress" android:layout_width="130dp" android:layout_height="130dp" android:scaleType="fitXY" android:src="@mipmap/image_3" app:border_color="#93dfdd" app:border_width="5dp" app:type="circle" android:layout_margin="10dp" /> <com.lqm.roundview.RoundImageView android:layout_width="130dp" android:layout_height="130dp" android:scaleType="fitXY" android:src="@mipmap/image_3" app:border_color="#7195ae" app:border_width="5dp" app:type="circle" app:progress_border="120" app:progress_color="#eda167" android:layout_margin="10dp" /></LinearLayout>
github地址:
自定义圆角ImageView
阅读全文
0 0
- 自定义圆角ImageView
- 自定义圆角ImageVIew
- 自定义圆角ImageView
- 自定义圆角ImageView
- Android自定义圆角ImageView
- android 自定义圆角imageview
- Android 自定义圆角ImageView
- 自定义圆角ImageView MyCircleImageView
- 自定义ImageView实现圆角
- Android自定义圆角ImageView
- 自定义的圆角ImageView
- 自定义圆形或圆角imageview
- 自定义ImageView实现圆角矩形
- 自定义圆角imageview方案2
- Android 自定义圆角、立体ImageView -- MaterialImageView
- Android自定义圆角矩形图片ImageView
- android自定义圆角矩形Imageview
- android自定义圆角imageview学习
- java web中监听本地磁盘文件,并进行上传,复制,处理等
- java中的基本数据类型
- 余弦相似度与正规化的欧氏距离的某种等价性
- Hibernate 初始化:获取SessionFactory的各种方式
- 20171012 SQL语句JOIN关键字
- 自定义圆角ImageView
- 从头编写 asp.net core 2.0 web api 基础框架 (3)
- babyheap 2017漏洞分析
- tf.random_uniform的使用
- git --- If no other git process is currently running, this probably means a git process crashed in
- Kylin 之对大数据量的多维分析
- iPhone X App 页面适配
- 能力糟糕的程序员日记第一 二天
- HYSBZ bzoj 1941 Hide and Seek