Android 自定义圆形头像
程序员文章站
2024-02-02 12:42:22
...
CircleImageView
简介:A circular ImageView simply used as normal ImageView.
A circular ImageView simply used as normal ImageView.
it's easy to use just like ImageView,and you never need to do this:
- create a new bitmap.
- fixed scale type.(CENTER_CROP)
you can simply use the library like Picasso or Glide with this view.
Gradle
dependencies {
...
compile 'com.vivifarm.view:circleimageview:1.2.0'
}
Usage
<com.zuowei.circleimageview.CircleImageView
android:src="@mipmap/lufei"
android:scaleType="centerCrop"
style="@style/circle_style" />
<com.zuowei.circleimageview.CircleImageView
android:src="@mipmap/lufei"
android:scaleType="centerInside"
style="@style/circle_style" />
<com.zuowei.circleimageview.CircleImageView
android:src="@mipmap/lufei"
android:scaleType="fitXY"
style="@style/circle_style" />
<com.zuowei.circleimageview.CircleImageView
android:src="@mipmap/lufei"
android:scaleType="fitCenter"
style="@style/circle_style" />
<com.zuowei.circleimageview.CircleImageView
android:src="@mipmap/lufei"
android:scaleType="matrix"
style="@style/circle_style" />
上一篇: 48 WebGL绘制圆形的点
下一篇: 通过清理cookie实现无限投票
推荐阅读
-
Android 自定义圆形头像
-
自定义Drawable 实现图片圆角、圆形、椭圆形
-
Android 圆形头像的两种实现方式
-
Android自定义View学习之圆角图片(圆形图片)
-
超实用的Andoird圆形头像设置 —— 实现相机、相册选择并裁剪尽在一行代码之间(兼容Android6.0/7.0)
-
Android 自定义进度条
-
Android圆形进度条
-
在WordPress中实现评论头像的自定义默认和延迟加载,wordpress头像
-
Android开发实现自定义Toast、LayoutInflater使用其他布局示例
-
多说自定义CSS动感头像和多说评论显示User Agent的那些小事_html/css_WEB-ITnose