App Intro Screen | Android App Development | Lecture#51 | Hive Learners

Words
289
Reading
2 min
Listen
Play
4y

饾摉饾摶饾摦饾摦饾摻饾摬饾摲饾摪饾摷

Hello Hive Learners, I hope you all are well. In lecture 50 we learn the efficient way to implement the Splash screen in our Android Project, Today we will learn how to add an intro to our App. We will use the App Intro a FancyWalkthrough-Android library from GitHub and use it in our project. It is the simple and more reliable way to implement the App Intro in Android Project. We can also do it manually by using the Fragments and ViewPager. But this time we will use the Library.

alt

GitHub Link

Use this GitHub project to clone into your directory. The following lecture will update it so you will never miss the latest code. Happy Coding!

What Should I Learn

  • How to implement App Introduction Pages

Assignment

  • Implement the App Intro in your project

Procedure

First of all, we need to implement the requirement in our project go to the official GitHub library of FancyWalkthrough-Android Link. You will find how to set it up in the Android Project. Follow these steps.

add this in the settings.gradle file in repositories tag.

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

alt

add this implementation in the dependencies tag and sync the project

    implementation 'com.github.Shashank02051997:FancyWalkthrough-Android:2.3'

alt

Now create a class with the name App_Intro.java

alt

alt

Extends this class with FancyWalkthroughActivity and add this code you can customize it.

puc class App_Intro extends FancyWalkthroughActivity {
    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        FancyWalkthroughCard fancywalkthroughCard1 = new FancyWalkthroughCard("Welcome", "Hive Learners", R.drawable.hive_logo);
        fancywalkthroughCard1.setBackgroundColor(R.color.white);
        fancywalkthroughCard1.setTitleColor(R.color.black);
        fancywalkthroughCard1.setDescriptionColor(R.color.black);

        FancyWalkthroughCard fancywalkthroughCard2 = new FancyWalkthroughCard("Learn and Earn", "with Lazy-Panda", R.drawable.hive_logo);
        fancywalkthroughCard2.setBackgroundColor(R.color.white);
        fancywalkthroughCard2.setTitleColor(R.color.black);
        fancywalkthroughCard2.setDescriptionColor(R.color.black);


    }

    @Override
    public void onFinishButtonPressed() {

    }
}

alt

Now we need to create a list of these pages and set it in the setOnboardPages you can also find this implementation on the library GitHub page.

alt

It is now an activity with no layout we need to declare it in the Manifest and in Splash_Activity.java file after 2 seconds of code, we redirect the app to this App_Intro page.

alt

alt

Run the App and if it is working or not.

alt

hl_divider.png

Thank You

hl_footer_banner.png

App Intro Screen | Android App Development | Lecture#51 | Hive Lear... | Ecency