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 reduce APK package size?
What is the difference between match_parent and fill_parent?
What is ANR in android?
How do i load image from drawable folder in Jetpack Compose?
Open PDF in Google Drive with Intent in Android - RRutors
How to Exit android app on back pressed?
How to save activity State in Android?
How to start a new activity on button click
How to get screen size (width,height) in Android?
How to get an image resource by it's name in android?
What is ANR? How to avoid and resolve it?
What are the notifications available in android?
INSTALL_FAILED_INVALID_APK: Split lib_slice_9_apk was defined multiple times. It is possible that th
How do I check in SQLite whether a table exists?
What is NetworkOnMainThread Exception?
Android Studio project R can't find
Check List for Generate Signed APK Android
What is the Different Between val and var in Kotlin?
How To Set Text Color Programmatically Android TextView?
Fix Error: Use JsonReader.setLenient(true) for Malformed JSON
Fix Play Store Rejection Due to SMS Permission - RRutors
Explain Fragment Life Cycle
How to find Android Device UDID or unique ID?
How to install/ uninstall apk by command line ADB
How to Use Deprecated Handler() in Android - RRutors Guide
What is Application?
What is "shared preferences" in Android ?
ERR_ACCESS_DENIED in Android Webview with sdk 30
Set Activity to Fullscreen Mode in Android - RRutors
Hide/Disable soft keyboard on Activity launch: Android
How to stop EditText focus at Activity startup in Android?
What is Android?
Add Jar/Library Files as Dependency in Android Studio
Symmetric vs Asymmetric Encryption in Android Server - RRutors
Fix Android Emulator Kill Error When Running Your App
How to convert milli seconds to hours, minutes and seconds in Android?
Permission denied for window type 2010 in Marshmallow device
FCM Not Receiving Notifications in Android - RRutors
How to Generate signed apk with android studio
How do I generate random numbers in Dart?