实现一个很酷的Android应用介绍:AppIntro

gf67 10年前

AppIntro帮助您实现一个很酷的Android应用介绍。

使用说明:

build.gradle:


repositories {      mavenCentral()  }    dependencies {    compile 'com.github.paolorotolo:appintro:1.1.0'  }


创建一个继承自AppIntro的Activity


public class MyIntro extends AppIntro {        // Please DO NOT override onCreate. Use init.      @Override      public void init(Bundle savedInstanceState) {            // Add your slide's fragments here.          // AppIntro will automatically generate the dots indicator and buttons.          addSlide(new FirstSlide(), getApplicationContext());          addSlide(new SecondSlide(), getApplicationContext());          addSlide(new ThirdSlide(), getApplicationContext());          addSlide(new FourthSlide(), getApplicationContext());            // You can override bar/separator color if you want.          setBarColor(Color.parseColor("#3F51B5"));          setSeparatorColor(Color.parseColor("#2196F3"));            // You can also hide Skip button          showSkipButton(false);      }        @Override      public void onSkipPressed() {      // Do something when users tap on Skip button.      }        @Override      public void onDonePressed() {      // Do something when users tap on Done button.      }  }


注意 不要重写onCreate,只用 init 方法就可以了。


项目主页:http://www.open-open.com/lib/view/home/1434096459676