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 start a new activity on button click
Fix Android Emulator Kill Error When Running Your App
What are Android Versions available?
How do i load image from drawable folder in Jetpack Compose?
INSTALL_FAILED_INVALID_APK: Split lib_slice_9_apk was defined multiple times. It is possible that th
How to stop EditText focus at Activity startup in Android?
What is ANR in android?
Explain Fragment Life Cycle
How to Generate signed apk with android studio
How to find Android Device UDID or unique ID?
How can i comment inside xml file in android studio?
How to Get bitmap from drawable: Android
What is the difference between match_parent and fill_parent?
Android Studio project R can't find
How to get an image resource by it's name in android?
Add Jar/Library Files as Dependency in Android Studio
What are the notifications available in android?
Extract Date and Time from Long Type Variable - RRutors
ERR_ACCESS_DENIED in Android Webview with sdk 30
How do I generate random numbers in Dart?
What is Android Fragments?
Fix Play Store Rejection Due to SMS Permission - RRutors
What is Application?
What is "shared preferences" in Android ?
What is Android?
How to convert DP to Pixel and Pixel to Dp?
Decompile APK Files: How to Get Source Code - RRutors Guide
Hide/Disable soft keyboard on Activity launch: Android
Open PDF in Google Drive with Intent in Android - RRutors
What is the Different Between val and var in Kotlin?
What is NetworkOnMainThread Exception?
What is Context?
How to avoid multiple button click at same time in android?
How to install/ uninstall apk by command line ADB
How to convert milli seconds to hours, minutes and seconds in Android?
Set Activity to Fullscreen Mode in Android - RRutors
How to get complete address from latitude and longitude?
Fix Error: Use JsonReader.setLenient(true) for Malformed JSON
FCM Not Receiving Notifications in Android - RRutors
How to get a contact image using a phone number in android?