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 validate email address in Android with Kotlin?
How to copy database from assets folder in android using kotlin
Fix Android Emulator Kill Error When Running Your App
What is Android Fragments?
How to convert DP to Pixel and Pixel to Dp?
What are Android Versions available?
How do I generate random numbers in Dart?
How to Use Deprecated Handler() in Android - RRutors Guide
How to get screen size (width,height) in Android?
Check List for Generate Signed APK Android
How to check Android version?
Open PDF in Google Drive with Intent in Android - RRutors
What is ANR in android?
How to start a new activity on button click
How to Exit android app on back pressed?
How to convert milli seconds to hours, minutes and seconds in Android?
Set Activity to Fullscreen Mode in Android - RRutors
What is the difference between match_parent and fill_parent?
How to find Android Device UDID or unique ID?
Key Points to remember while develop the Android Application.
How to get an image resource by it's name in android?
FCM Not Receiving Notifications in Android - RRutors
How to get a contact image using a phone number in android?
Android Studio project R can't find
How to reduce APK package size?
How To Set Text Color Programmatically Android TextView?
Explain Fragment Life Cycle
What is Intent? What is the difference between an implicit intent and an explicit intent?
What happens next when the device switches between portrait and landscape?
Invoke-customs are only supported starting with android 0 --min-api 26
Fix Duplicate Files in APK Build.gradle Issue - RRutors
What is the Different Between val and var in Kotlin?
INSTALL_FAILED_INVALID_APK: Split lib_slice_9_apk was defined multiple times. It is possible that th
Permission denied for window type 2010 in Marshmallow device
How can i comment inside xml file in android studio?
Emulator: emulator: ERROR: Can't find 'Linux version ' string in kernel image file: Andr
What is NetworkOnMainThread Exception?
How to avoid multiple button click at same time in android?
Extract Date and Time from Long Type Variable - RRutors
Add Jar/Library Files as Dependency in Android Studio