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
What happens next when the device switches between portrait and landscape?
Fix Duplicate Files in APK Build.gradle Issue - RRutors
How to Generate signed apk with android studio
How can i comment inside xml file in android studio?
How to Exit android app on back pressed?
What is "shared preferences" in Android ?
What is Intent? What is the difference between an implicit intent and an explicit intent?
Decompile APK Files: How to Get Source Code - RRutors Guide
What is Android?
How to get a contact image using a phone number in android?
Fix Error: Use JsonReader.setLenient(true) for Malformed JSON
What is Context?
How do I check in SQLite whether a table exists?
How to Use Deprecated Handler() in Android - RRutors Guide
Fix Android Emulator Kill Error When Running Your App
How do I generate random numbers in Dart?
How to validate email address in Android with Kotlin?
How to install/ uninstall apk by command line ADB
Symmetric vs Asymmetric Encryption in Android Server - RRutors
What are Android Versions available?
How to copy database from assets folder in android using kotlin
FragmentPagerAdapter deprecated, Since API 27.1.0 FragmentPagerAdapter is deprecated.
How to convert DP to Pixel and Pixel to Dp?
What is ANR in android?
How to check Android version?
Add Jar/Library Files as Dependency in Android Studio
INSTALL_FAILED_INVALID_APK: Split lib_slice_9_apk was defined multiple times. It is possible that th
Permission denied for window type 2010 in Marshmallow device
How To Set Text Color Programmatically Android TextView?
Key Points to remember while develop the Android Application.
Fix Play Store Rejection Due to SMS Permission - RRutors
Extract Date and Time from Long Type Variable - RRutors
Explain Fragment Life Cycle
How do i load image from drawable folder in Jetpack Compose?
How to find Android Device UDID or unique ID?
ERR_ACCESS_DENIED in Android Webview with sdk 30
What is ANR? How to avoid and resolve it?
How to avoid multiple button click at same time in android?
How to Get bitmap from drawable: Android
What is the difference between match_parent and fill_parent?