微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

AppIntro Android 引导页库

程序名称:AppIntro

授权协议: Apache

操作系统: Android

开发语言: Java

AppIntro 介绍

AppIntro 是一个让人轻松快速搭建漂亮酷炫的引导页库。

效果图:


使用

build.gradle :

repositories {
    mavenCentral()
}

dependencies {
  compile 'com.github.paolorotolo:appintro:3.4.0'
}

继承 AppIntro

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(first_fragment);
        addSlide(second_fragment);
        addSlide(third_fragment);
        addSlide(fourth_fragment);        // Instead of fragments, you can also use our default slide
        // Just set a title, description, background and image. AppIntro will do the rest.
        addSlide(AppIntroFragment.newInstance(title, description, image, background_colour));        // OPTIONAL METHODS
        // Override bar/separator color.
        setBarColor(Color.parseColor("#3F51B5"));
        setSeparatorColor(Color.parseColor("#2196F3"));        // Hide Skip/Done button.
        showSkipButton(false);
        setProgressButtonEnabled(false);        // Turn vibration on and set intensity.
        // NOTE: you will probably need to ask VIBRATE permisssion in Manifest.
        setVibrate(true);
        setVibrateIntensity(30);
    }    @Override
    public void onSkippressed() {    // Do something when users tap on Skip button.
    }    @Override
    public void onDonepressed() {    // Do something when users tap on Done button.
    }        @Override
    public void onSlideChanged() {    // Do something when the slide changes.
    }    @Override
    public void onNextpressed() {    // Do something when users tap on Next button.
    }

}

AppIntro 官网

https://github.com/PaoloRotolo/AppIntro

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。

相关推荐