Skip to content

It generates a circular Image from users display names with animation support

License

Notifications You must be signed in to change notification settings

memishood/display-name-view

Repository files navigation

License

DisplayNameView generates an avatar from users name.

Setup

allprojects {
    repositories {
        ...
        maven { url 'https://jitpack.io' }
    }
}
dependencies {
    implementation "com.github.memishood:display-name-view:1.0.4"
}

XML

<com.emrememis.library.DisplayNameView
        android:id="@+id/display_name_view"
        android:layout_width="120dp"
        android:layout_height="120dp"
        app:displayName="Johnny Bravo"
        app:textSize="31sp"
        app:textColor="@color/white"
        app:backgroundColor="@color/purple_200"
        app:strokeWidth="6dp"
        app:strokeColor="@color/black"/>

Java

DisplayNameView displayNameView = findViewById(R.id.display_name_view);
// start the animation
displayNameView.startAnim();
// stop the animation
displayNameView.stopAnim();

Animation output