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 save activity State in Android?
What are Android Versions available?
Check List for Generate Signed APK Android
How to avoid multiple button click at same time in android?
What is Intent? What is the difference between an implicit intent and an explicit intent?
Fix Duplicate Files in APK Build.gradle Issue - RRutors
ERR_ACCESS_DENIED in Android Webview with sdk 30
How to convert milli seconds to hours, minutes and seconds in Android?
What is ANR? How to avoid and resolve it?
Permission denied for window type 2010 in Marshmallow device
How To Set Text Color Programmatically Android TextView?
Android Studio project R can't find
What is Context?
Fix Android Emulator Kill Error When Running Your App
How do I generate random numbers in Dart?
What is NetworkOnMainThread Exception?
Fix Error: Use JsonReader.setLenient(true) for Malformed JSON
Fix Play Store Rejection Due to SMS Permission - RRutors
How do I check in SQLite whether a table exists?
How to Get bitmap from drawable: Android
Fix Behavior Subclass BottomSheetBehavior Exception - RRutors
How to copy database from assets folder in android using kotlin
FCM Not Receiving Notifications in Android - RRutors
How to check Android version?
How to stop EditText focus at Activity startup in Android?
How to Exit android app on back pressed?
How to validate email address in Android with Kotlin?
How to reduce APK package size?
How to start a new activity on button click
How do i load image from drawable folder in Jetpack Compose?
How to get complete address from latitude and longitude?
Explain Fragment Life Cycle
Open PDF in Google Drive with Intent in Android - RRutors
How can i comment inside xml file in android studio?
What is "shared preferences" in Android ?
How to Generate signed apk with android studio
What are the notifications available in android?
Set Activity to Fullscreen Mode in Android - RRutors
Key Points to remember while develop the Android Application.
What is Android Fragments?