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
What is Android Fragments?
How to check Android version?
What is Android?
How to find Android Device UDID or unique ID?
How do I generate random numbers in Dart?
How to Get bitmap from drawable: Android
What happens next when the device switches between portrait and landscape?
Fix Android Emulator Kill Error When Running Your App
Check List for Generate Signed APK Android
What are the notifications available in android?
How to Exit android app on back pressed?
Extract Date and Time from Long Type Variable - RRutors
What is ANR in android?
Fix Behavior Subclass BottomSheetBehavior Exception - RRutors
INSTALL_FAILED_INVALID_APK: Split lib_slice_9_apk was defined multiple times. It is possible that th
FCM Not Receiving Notifications in Android - RRutors
What is the difference between match_parent and fill_parent?
How to Generate signed apk with android studio
How to copy database from assets folder in android using kotlin
Emulator: emulator: ERROR: Can't find 'Linux version ' string in kernel image file: Andr
How To Set Text Color Programmatically Android TextView?
How to get screen size (width,height) in Android?
Fix Error: Use JsonReader.setLenient(true) for Malformed JSON
What are Android Versions available?
Symmetric vs Asymmetric Encryption in Android Server - RRutors
How to convert milli seconds to hours, minutes and seconds in Android?
Decompile APK Files: How to Get Source Code - RRutors Guide
Add Jar/Library Files as Dependency in Android Studio
Open PDF in Google Drive with Intent in Android - RRutors
How can i comment inside xml file in android studio?
Invoke-customs are only supported starting with android 0 --min-api 26
How do I check in SQLite whether a table exists?
What is Application?
Hide/Disable soft keyboard on Activity launch: Android
What is ANR? How to avoid and resolve it?
How to convert DP to Pixel and Pixel to Dp?
ERR_ACCESS_DENIED in Android Webview with sdk 30
What is "shared preferences" in Android ?
How to get complete address from latitude and longitude?
How to start a new activity on button click