圆形Imageview: CircleImageView

本文介绍了一款适用于iOS应用的圆形头像自定义控件CircleImageView,该控件可在XML文件中直接引用并轻松设置边框宽度及颜色。

IOS7出来之后基本所有的应用的头像显示都是圆的,  本篇和大家分享的是自定义控件 CircleImageView

GitHub地址:  https://github.com/hdodenhof/CircleImageView




使用说明:

XML文件中引用自定义控件类即可


<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:paddingBottom="@dimen/activity_vertical_margin"
    android:paddingLeft="@dimen/activity_horizontal_margin"
    android:paddingRight="@dimen/activity_horizontal_margin"
    android:paddingTop="@dimen/activity_vertical_margin"
    tools:context=".MainActivity" 
    >

    <com.yangxt.mycircleimageview.CircleImageView
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:id="@+id/profile_image"
    android:layout_width="100dp"
    android:layout_height="100dp"     
    android:src="@drawable/awr"
    app:border_width="2dp"
    app:border_color="#000000"/>

</RelativeLayout>


源码地址: http://download.youkuaiyun.com/detail/u010333409/7864151



评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值