Skip to content

ArslanKathia/AchievementView

 
 

Repository files navigation

AchievementView

Release API

Library Achievemente View to show mensage or informative in your app

Add it to your build.gradle with:

allprojects {
    repositories {
        maven { url "https://jitpack.io" }
    }
}

and:

dependencies {
     compile 'com.github.RafaelBarbosatec:AchievementView:0.1.4'
}

Add in view

<com.rafaelbarbosatec.archivimentview.AchievementView
        android:id="@+id/achievementView"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
	app:ac_tittle="Parabéns"
        app:ac_mensage="Acabou de ganhar 50 coins"
        app:ac_icon="@drawable/ic_news"
        app:ac_color="@color/colorPrimaryDark"
        app:ac_text_color="@color/colorAccent">

</com.rafaelbarbosatec.archivimentview.AchievementView>

Or

achievementView = (AchievementView) findViewById(R.id.achievementView);

achievementView
            .setTitle("Treino Finalizado")
            .setMensage("Você ganhou 50 pontos de força!")
            //.setBorderRetangle()
            .setColor(R.color.colorAccent)
            .setIcon(R.drawable.ic_sun)
            //.setScaleTypeIcon(ImageView.ScaleType.CENTER_INSIDE)
            .setClick(new View.OnClickListener() {
                            @Override
                            public void onClick(View view) {
                                Toast.makeText(MainActivity.this,"Click AchievementView",Toast.LENGTH_SHORT).show();
                            }
                        })
            .show();

Show Achievement

achievementView = (AchievementView) findViewById(R.id.achievementView);
achievementView.show();

License

This library is licensed under the Apache Software License, Version 2.0.

See LICENSE for full of the license text.

Copyright (C) 2015 Haruki Hasegawa

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Java 100.0%