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
Emulator: emulator: ERROR: Can't find 'Linux version ' string in kernel image file: Andr
Decompile APK Files: How to Get Source Code - RRutors Guide
Hide/Disable soft keyboard on Activity launch: Android
How to start a new activity on button click
What is Context?
How to validate email address in Android with Kotlin?
What is Android?
How to copy database from assets folder in android using kotlin
What is NetworkOnMainThread Exception?
Invoke-customs are only supported starting with android 0 --min-api 26
How to reduce APK package size?
Fix Duplicate Files in APK Build.gradle Issue - RRutors
How to check Android version?
Android Studio project R can't find
How to get screen size (width,height) in Android?
FCM Not Receiving Notifications in Android - RRutors
Explain Fragment Life Cycle
What happens next when the device switches between portrait and landscape?
How to Get bitmap from drawable: Android
Add Jar/Library Files as Dependency in Android Studio
Fix Behavior Subclass BottomSheetBehavior Exception - RRutors
How do I generate random numbers in Dart?
How to Generate signed apk with android studio
What is the Different Between val and var in Kotlin?
What is Application?
How to save activity State in Android?
What are Android Versions available?
Fix Error: Use JsonReader.setLenient(true) for Malformed JSON
Extract Date and Time from Long Type Variable - RRutors
How to get complete address from latitude and longitude?
Permission denied for window type 2010 in Marshmallow device
Set Activity to Fullscreen Mode in Android - RRutors
INSTALL_FAILED_INVALID_APK: Split lib_slice_9_apk was defined multiple times. It is possible that th
What is ANR in android?
How to Exit android app on back pressed?
What are the notifications available in android?
How to stop EditText focus at Activity startup in Android?
Fix Play Store Rejection Due to SMS Permission - RRutors
Open PDF in Google Drive with Intent in Android - RRutors
Check List for Generate Signed APK Android