A fast circular ImageView perfect for profile images. This is based on RoundedImageView from Vince Mi which itself is based on techniques recommended by Romain Guy.
- Step 1:Add the JitPack repository to your build file
Add it in your root build.gradle at the end of repositories:
allprojects {
repositories {
...
maven { url 'https://jitpack.io' }
}
}
- Step 2:Add the dependency
The latest version shall prevail.
dependencies {
implementation 'com.github.huangziye:CircleImageView:${latest_version}'
}
<com.hzy.circle.CircleImageView
android:layout_width="100dp"
android:layout_height="100dp"
android:src="@mipmap/a"
android:layout_marginTop="10dp"
app:civ_border_width="2dp"
app:civ_border_color="@color/colorAccent"/>
Copyright 2018, huangziye
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.