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 convert DP to Pixel and Pixel to Dp?
Add Jar/Library Files as Dependency in Android Studio
How can i comment inside xml file in android studio?
How do I generate random numbers in Dart?
How to get an image resource by it's name in android?
How to convert milli seconds to hours, minutes and seconds in Android?
What is ANR? How to avoid and resolve it?
What is NetworkOnMainThread Exception?
Invoke-customs are only supported starting with android 0 --min-api 26
Permission denied for window type 2010 in Marshmallow device
What is ANR in android?
What is Android?
What happens next when the device switches between portrait and landscape?
How to get screen size (width,height) in Android?
How to Generate signed apk with android studio
How to start a new activity on button click
How to Get bitmap from drawable: Android
Fix Play Store Rejection Due to SMS Permission - RRutors
How to avoid multiple button click at same time in android?
Android Studio project R can't find
What is the difference between match_parent and fill_parent?
What are Android Versions available?
How to validate email address in Android with Kotlin?
How to check Android version?
What is Context?
Extract Date and Time from Long Type Variable - RRutors
ERR_ACCESS_DENIED in Android Webview with sdk 30
What is "shared preferences" in Android ?
How to install/ uninstall apk by command line ADB
What are the notifications available in android?
Hide/Disable soft keyboard on Activity launch: Android
What is Application?
How to copy database from assets folder in android using kotlin
How to save activity State in Android?
How to reduce APK package size?
Symmetric vs Asymmetric Encryption in Android Server - RRutors
How to Use Deprecated Handler() in Android - RRutors Guide
Fix Error: Use JsonReader.setLenient(true) for Malformed JSON
Explain Fragment Life Cycle
FragmentPagerAdapter deprecated, Since API 27.1.0 FragmentPagerAdapter is deprecated.