A simple AvatarView based on the AppCompatImageView.
Add to your root build.gradle:
allprojects {
repositories {
...
maven { url "https://jitpack.io" }
}
}
Add the dependency:
dependencies {
implementation 'com.github.TalbotGooday:AvatarView:x.x.x'
}
Settle the AvatarView somewhere in your XML like this:
<com.goodayapps.widget.AvatarView
android:id="@+id/avatarView"
android:layout_width="@dimen/avatar_size"
android:layout_height="@dimen/avatar_size"
android:src="drawable"
app:avBackgroundColor="color|reference"
app:avBorderColor="color|reference"
app:avBorderColorSecondary="color|reference"
app:avBorderWidth="dimension"
app:avVolumetricType="none|all|drawable|placeholder"
app:avAvatarMargin="dimension"
app:avTextSizePercentage="float"
app:iconDrawableScale="float"
app:placeholderText="string" />
- Animated border
- Border progress
- Online indicator
- Border arches better logic
This project is licensed under the MIT License - see the LICENSE file for details