Рет қаралды 96,448
🏆 My Online Courses
⭐Discount Coupon: LAUNCH-STEVDZA-SAN
stevdza-san.com
🐱👤 Wanna become a member? Join!
/ @stevdzasan
📸 Instagram
/ stevdza_san
ViewPager2 allows us display a collection of fragments or views to display to the user in a swipe-able format, especially popular within on-boarding and content display screens.
In this video we are going to implement ViewPager2 with Navigation component to create Onboarding screens. You will learn how to show Onboarding screens only the first time a user launches your app. And with Navigation component we can manage to do that in an elegant way.
If you haven't watched following videos I highly recommend you to do that before watching this one:
Navigation Component: • Navigation Component -...
Live Templates: • Live Templates - Andro...
Project Files: github.com/stevdza-san/ViewPa...
Timestamps
0:00 - Introduction
0:21 - Create Splash Screen (Fragment)
1:02 - Create Navigation Graph
1:23 - Add NavHost Fragment
1:50 - Create ViewPager Fragment
2:50 - Create ViewPager Adapter
3:58 - Create 3 Onboarding Screens (Fragments)
7:13 - Implement Logic for Splash Screen
8:51 - Implement Logic for Onboarding Screens
12:12 - Check if user has Completed Onboarding
15:46 - Fix Navigation Backstack