展会信息港展会大全

如何完成圆形的ImageView
来源:互联网   发布日期:2016-01-14 11:31:37   浏览:1754次  

导读:?xml version=1.0 encoding=utf-8? RelativeLayout xmlns:android=http://schemas.android.com/apk/res/android xmlns:app=http://schemas.android.com/apk/res-auto android:orientation=vertical android:layout_width=match_parent android:layout_height...

<?xml version="1.0" encoding="utf-8"?>

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"

xmlns:app="http://schemas.android.com/apk/res-auto"

android:orientation="vertical"

android:layout_width="match_parent"

android:layout_height="wrap_content">

<de.hdodenhof.circleimageview.CircleImageView

xmlns:app="http://schemas.android.com/apk/res-auto"

android:id="@+id/user_face"

app:border_width="4dp"

app:border_color="#ffffff"

android:layout_marginTop="86dp"

android:layout_centerHorizontal="true"

android:layout_width="104dp"

android:layout_height="104dp" />

</RelativeLayout>

private void initView(Bitmap loadedImage) {

userFace = (ImageView) findViewById(R.id.user_face);

userFace.setImageBitmap(loadedImage);

}

dependencies {

compile 'de.hdodenhof:circleimageview:1.2.2'

}

赞助本站

人工智能实验室

相关热词: android开发 android教程

AiLab云推荐
推荐内容
展开

热门栏目HotCates

Copyright © 2010-2024 AiLab Team. 人工智能实验室 版权所有    关于我们 | 联系我们 | 广告服务 | 公司动态 | 免责声明 | 隐私条款 | 工作机会 | 展会港