While working with Viewpager with FragmentPagerAdapter i have noticed this deprecated messages. i have created FragmentPagerAdapter class like below To overcome the issue i have modified FragmentPagerAdapter() constructor Solution 1: By replacing the above code with below code we can resolve the error Solution 2:
class MyViewPagerAdapter(manager: FragmentManager) : FragmentPagerAdapter(manager)
class MyViewPagerAdapter(manager:FragmentManager) : FragmentPagerAdapter(manager, FragmentPagerAdapter.BEHAVIOR_RESUME_ONLY_CURRENT_FRAGMENT)
There is another way to fix the issues by "Migrate from ViewPager to ViewPager2"

By switch from Viewpager to ViewPager2 and create adapter by FragmentStateAdapter or FragmentStatePagerAdapter instead
How to get screen size (width,height) in Android?
How to start a new activity on button click
Fix Play Store Rejection Due to SMS Permission - RRutors
What is ANR in android?
Invoke-customs are only supported starting with android 0 --min-api 26
What are the notifications available in android?
Fix Android Emulator Kill Error When Running Your App
Permission denied for window type 2010 in Marshmallow device
Open PDF in Google Drive with Intent in Android - RRutors
How to convert milli seconds to hours, minutes and seconds in Android?
What is Android Fragments?
What is Intent? What is the difference between an implicit intent and an explicit intent?
How to Use Deprecated Handler() in Android - RRutors Guide
How to Generate signed apk with android studio
How do I generate random numbers in Dart?
What is Android?
How to get complete address from latitude and longitude?
INSTALL_FAILED_INVALID_APK: Split lib_slice_9_apk was defined multiple times. It is possible that th
How to Get bitmap from drawable: Android
How to copy database from assets folder in android using kotlin
How to save activity State in Android?
How to install/ uninstall apk by command line ADB
Extract Date and Time from Long Type Variable - RRutors
What is NetworkOnMainThread Exception?
FCM Not Receiving Notifications in Android - RRutors
How to avoid multiple button click at same time in android?
Check List for Generate Signed APK Android
How to get a contact image using a phone number in android?
Add Jar/Library Files as Dependency in Android Studio
What are Android Versions available?
How To Set Text Color Programmatically Android TextView?
How to Exit android app on back pressed?
What is Context?
What is Application?
How can i comment inside xml file in android studio?
Key Points to remember while develop the Android Application.
Explain Fragment Life Cycle
How to validate email address in Android with Kotlin?
Hide/Disable soft keyboard on Activity launch: Android
Fix Duplicate Files in APK Build.gradle Issue - RRutors