实现一个很酷的Android应用介绍:AppIntro
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 方法就可以了。
本文由用户 gf67 自行上传分享,仅供网友学习交流。所有权归原作者,若您的权利被侵害,请联系管理员。
转载本站原创文章,请注明出处,并保留原始链接、图片水印。
本站是一个以用户分享为主的开源技术平台,欢迎各类分享!