Skip to content
A custom view to show achievements on Android
Kotlin Java
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.
.idea Minor fixes Jun 4, 2017
achievementview Increase version number Jun 4, 2017
app Minor fixes Jun 4, 2017
art Add gif to README Jun 4, 2017
.gitignore Merge gitignore files Jun 4, 2017
LICENSE Initial commit Jun 4, 2017 Update Dec 11, 2018
build.gradle Initial commit Jun 4, 2017
gradlew Initial commit Jun 4, 2017
gradlew.bat Initial commit Jun 4, 2017
settings.gradle Initial commit Jun 4, 2017

AchievementView for Android

A custom view for achievements pop-ups written in Kotlin.

The basic properties can be changed through XML like its size, color, drawable, duration. If this isn't enough then feel free to customize as you wish!



You can import the achievementview module into your project or just grab it via Gradle,

compile ''


1. Include into your layout


2. Get a reference and call show


AchievementView achievementView = (AchievementView) findViewById(;

// show the achievement with a single line"Single line text");

// show the achievement with two lines"First line", "Second line");


val achievementView = findViewById( as AchievementView

// show the achievement with a single line"Single line text")

// show the achievement with two lines"First line", "Second line")

3. Clear animation

You need to call clearAnimation() to cancel any ongoing animation when you intend to, also consider to call it in onPause() or onStop().


The following attributes can be changed,

custom:rightPartWidth="250dp"                   // default 300 dp
custom:revealDuration="300"                     // default 500 ms
custom:concealStartDelay="1000"                 // default 500 ms
custom:expandDuration="300"                     // default 500 ms
custom:collapseStartDelay="3500"                // default 1500 ms
custom:colorLeft="@color/green_light"           // default #607D8B
custom:colorRight="@color/green_dark"           // default #455A64
custom:drawableLeft="@drawable/trophy"          // default not set
custom:firstLine="First line"                   // default not set
custom:secondLine="Second line"                 // default not set
custom:textColorFirstLine="@color/colorPrimary" // default white
custom:textColorSecondLine="@color/colorAccent" // default white
custom:textSizeFirstLine="10sp"                 // default not set
custom:textSizeSecondLine="8sp"                 // default not set

If you doesn't specify an attribute, then a default value will be set.


This project is licensed under the MIT License - see the file for details

You can’t perform that action at this time.