AvatarView

A circular Image View with a lot of perks. Including progress animation and highlight state with borders and gradient color.

Demo

Watch the video or clone the repo and build the demo app

Importing to Gradle

Add this to your module's build.gradle file

repositories {
    maven { url "https://dl.bintray.com/vitorhugods/AvatarView" }
}

dependencies {
    implementation "xyz.schwaab:avvylib:0.0.1"
}
Gradle

Usage

Just add this to your XML:

    <xyz.schwaab.avvylib.AvatarView
        android:layout_width="128dp"
        android:layout_height="128dp"
        app:avvy_border_color="@color/grey400"
        app:avvy_border_highlight_color="#ff5900"
        app:avvy_border_highlight_color_end="#bf15bc"
        app:avvy_border_thickness="2dp"
        app:avvy_border_thickness_highlight="3dp"
        app:avvy_distance_to_border="5dp"
        app:avvy_highlighted="true"
        app:avvy_loading_arches="5"
        app:avvy_loading_arches_degree_area="90"/>
XML

You can personalize it in Kotlin:

        avatarView.apply {
            isAnimating = false
            borderThickness = 18 //Currently px
            highlightBorderColor = Color.GREEN
            highlightBorderColorEnd = Color.CYAN
            numberOfArches = 0
            totalArchesDegreeArea = 80
        }
Kotlin

Or, in Java:

        avatarView.setAnimating(false);
        avatarView.setBorderThickness(18); //Currently px
        avatarView.setHighlightBorderColor(Color.GREEN);
        avatarView.setHighlightBorderColorEnd(Color.CYAN);
        avatarView.setNumberOfArches(0);
        avatarView.setTotalArchesDegreeArea(80);
Java

GitHub