/AchievementUnlocked-library

[Android] AchievementUnlocked is an open-source Android library that creates "XBOX Achievement Unlocked"-like alerts.

Primary LanguageJava

AchievementUnlocked app demo

AchievementUnlocked

Animated pop-ups inspired by XBOX.

Download APK (for Android KitKat+)

License

GPL (App)

Library (MIT)

How to add to my app

Copy AchievementUnlocked.Java class to your app. That's it!


How to pop pop-ups

  1. Initialise achievementUnlocked object
    AchievementUnlocked achievementUnlocked = new AchievementUnlocked(getApplicationContext());
  2. Customise appearance
      achievementUnlocked.setRounded(rounded).setLarge(large).setTopAligned(top).setDismissible(dismiss)
  3. Supply the aforementioned object with AcheievementData
    AchievementData data = new AchievementData();
    data.setTitle(title); 
    data.setSubTitle(title);
    data.setIcon(iconFinal);  
    data.setTextColor(textColor);
    data.setIconBackgroundColor(iconBG);
    data.setBackgroundColor(bg);
    data.setPopUpOnClickListener(new View.OnClickListener() {
                    @Override
                    public void onClick(View v) {
                     
                    }
                });
  4. Pop your data!
    achievementUnlocked.show(data,data1,data2,data3);