Go through git-practical welcome page open-source library AppIntro

Source: Internet
Author: User

Go through git-practical welcome page open-source library AppIntro

Without P1 today, go to the topic

Today is a handsome app slide introduction page. Why handsome?

The author defines his content in this way.

Make a cool intro for your Android app.

Let's see how it works.

Can there be other operations besides sliding? Yes. See the following.

The gray buttons can be clicked, and the entire View's SKIP and next can also be hidden. That is to say, this View is live, and it is not a background.

How to use? <喎?http: www.bkjia.com kf ware vc " target="_blank" class="keylink"> VcD4NCjxwPkdyYWRsZTo8L3A + DQo8cHJlIGNsYXNzPQ = "brush: java;"> repositories { mavenCentral()}dependencies { compile 'com.github.paolorotolo:appintro:3.4.0'}

Eclipse has a large number of friends today. If you want to use it all, you need to copy more than a dozen classes. You can just copy what you need.

Because this is the implementation of a boot page, it may be different from some common business flow activities (what is the custom BaseActivity?). Therefore, the author directly encapsulates the parent class.

Must inherit from AppIntro

Public class your class extends AppIntro

Although he also inherits from AppCompatActivity, do not overwrite him.

public abstract class AppIntro extends AppCompatActivity 

The author wrote an init Method for us.public abstract void init(@Nullable Bundle savedInstanceState);

Then, call addSlide (your Fragment) to pass in Fragment, which is similar to the traditional ViewPager. AppIntro will automatically generate the dot indicator and button.

You can also use the default layout style to pass in the photo print control.addSlide(AppIntroFragment.newInstance(title, description, image, background_colour));

You can make some settings like this to set some colors to make them invisible.

        setBarColor(Color.parseColor("#3F51B5"));        setSeparatorColor(Color.parseColor("#2196F3"));        showSkipButton(false);        setProgressButtonEnabled(false);        setVibrate(true);        setVibrateIntensity(30);

When you click to Skip

     @Override    public void onSkipPressed() {    }

When the user clicks finish

     @Override    public void onDonePressed() {    }

Fragment needs to be changed

    @Override    public void onSlideChanged() {    }

When a user clicks the next button

     @Override    public void onNextPressed() {    }

The author has also prepared various animation effects. You can set them if necessary.

setFadeAnimation()setZoomAnimation()setFlowAnimation()setSlideOverAnimation()setDepthAnimation()

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.