The purpose of on-boarding screens is to introduce your mobile app and demonstrate what it offer to your users.
- SplashScreen (the first screen to be showen),
- ViewPagerFragment (the fragment that will contain OnBoardingScreens ),
- OnBoardingScreens (3 in our example),
- HomeFragment.
- Add nav_host to mainActivity,
- Create transactions.
Basically it is a class that extends the abstract class FragmentStateAdapter, then use this adapter in viewPagerFragement. the goal here is to add the OnBoardingScreens viewPager component.
To make sure that the onBoardingScreens will show only once, we are going to put a "flag" on true if the user completed onBoarding (look ThirdOnBoardScreen.kt)