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 Get bitmap from drawable: Android
How to stop EditText focus at Activity startup in Android?
How to check Android version?
How do I generate random numbers in Dart?
What is "shared preferences" in Android ?
What is Intent? What is the difference between an implicit intent and an explicit intent?
INSTALL_FAILED_INVALID_APK: Split lib_slice_9_apk was defined multiple times. It is possible that th
Decompile APK Files: How to Get Source Code - RRutors Guide
What is Application?
ERR_ACCESS_DENIED in Android Webview with sdk 30
How do i load image from drawable folder in Jetpack Compose?
Open PDF in Google Drive with Intent in Android - RRutors
How to save activity State in Android?
FragmentPagerAdapter deprecated, Since API 27.1.0 FragmentPagerAdapter is deprecated.
Fix Error: Use JsonReader.setLenient(true) for Malformed JSON
Fix Android Emulator Kill Error When Running Your App
How can i comment inside xml file in android studio?
Extract Date and Time from Long Type Variable - RRutors
Invoke-customs are only supported starting with android 0 --min-api 26
How to install/ uninstall apk by command line ADB
How To Set Text Color Programmatically Android TextView?
How to get complete address from latitude and longitude?
Explain Fragment Life Cycle
Android Studio project R can't find
Fix Behavior Subclass BottomSheetBehavior Exception - RRutors
How to Use Deprecated Handler() in Android - RRutors Guide
What happens next when the device switches between portrait and landscape?
What are Android Versions available?
How to start a new activity on button click
How to copy database from assets folder in android using kotlin
Symmetric vs Asymmetric Encryption in Android Server - RRutors
How to Generate signed apk with android studio
Check List for Generate Signed APK Android
How to validate email address in Android with Kotlin?
What is NetworkOnMainThread Exception?
How to get an image resource by it's name in android?
How to Exit android app on back pressed?
Fix Duplicate Files in APK Build.gradle Issue - RRutors
What are the notifications available in android?
How to convert DP to Pixel and Pixel to Dp?