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
Key Points to remember while develop the Android Application.
Add Jar/Library Files as Dependency in Android Studio
Extract Date and Time from Long Type Variable - RRutors
How can i comment inside xml file in android studio?
Set Activity to Fullscreen Mode in Android - RRutors
What is the Different Between val and var in Kotlin?
Hide/Disable soft keyboard on Activity launch: Android
How To Set Text Color Programmatically Android TextView?
How do I check in SQLite whether a table exists?
How to Exit android app on back pressed?
INSTALL_FAILED_INVALID_APK: Split lib_slice_9_apk was defined multiple times. It is possible that th
How to copy database from assets folder in android using kotlin
What is ANR? How to avoid and resolve it?
Decompile APK Files: How to Get Source Code - RRutors Guide
How to save activity State in Android?
What is Context?
How to reduce APK package size?
Android Studio project R can't find
How to avoid multiple button click at same time in android?
What is NetworkOnMainThread Exception?
What is "shared preferences" in Android ?
How to stop EditText focus at Activity startup in Android?
FCM Not Receiving Notifications in Android - RRutors
Invoke-customs are only supported starting with android 0 --min-api 26
What is Android Fragments?
How to validate email address in Android with Kotlin?
How do I generate random numbers in Dart?
Fix Play Store Rejection Due to SMS Permission - RRutors
How to check Android version?
How to get screen size (width,height) in Android?
How to Generate signed apk with android studio
ERR_ACCESS_DENIED in Android Webview with sdk 30
Fix Error: Use JsonReader.setLenient(true) for Malformed JSON
How to Use Deprecated Handler() in Android - RRutors Guide
How do i load image from drawable folder in Jetpack Compose?
What is the difference between match_parent and fill_parent?
How to start a new activity on button click
How to Get bitmap from drawable: Android
How to get a contact image using a phone number in android?
What is Android?