AndoridのUIライブラリ、CircleImageViewを使ってみた。
ユーザーのアイコンを丸くマスクしたいときに便利かも
いつもの
compile 'de.hdodenhof:circleimageview:2.0.0'
こんな感じ
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" xmlns:app="http://schemas.android.com/apk/res-auto" android:layout_width="match_parent" android:background="#111111" android:layout_height="match_parent" tools:context=".MainActivity"> <de.hdodenhof.circleimageview.CircleImageView android:layout_width="140dp" android:layout_height="140dp" android:layout_centerInParent="true" android:src="@mipmap/ic_launcher" app:civ_border_width="2dp" app:civ_border_color="#fff" /> </RelativeLayout>