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
What is Application?
Permission denied for window type 2010 in Marshmallow device
Emulator: emulator: ERROR: Can't find 'Linux version ' string in kernel image file: Andr
What happens next when the device switches between portrait and landscape?
How to get a contact image using a phone number in android?
What is NetworkOnMainThread Exception?
How to validate email address in Android with Kotlin?
Decompile APK Files: How to Get Source Code - RRutors Guide
Extract Date and Time from Long Type Variable - RRutors
ERR_ACCESS_DENIED in Android Webview with sdk 30
How to install/ uninstall apk by command line ADB
Add Jar/Library Files as Dependency in Android Studio
Fix Duplicate Files in APK Build.gradle Issue - RRutors
What is ANR? How to avoid and resolve it?
How to find Android Device UDID or unique ID?
Fix Error: Use JsonReader.setLenient(true) for Malformed JSON
What is ANR in android?
How can i comment inside xml file in android studio?
What is Intent? What is the difference between an implicit intent and an explicit intent?
How to start a new activity on button click
Android Studio project R can't find
FragmentPagerAdapter deprecated, Since API 27.1.0 FragmentPagerAdapter is deprecated.
What are Android Versions available?
Explain Fragment Life Cycle
What is Android?
How To Set Text Color Programmatically Android TextView?
How to reduce APK package size?
Invoke-customs are only supported starting with android 0 --min-api 26
FCM Not Receiving Notifications in Android - RRutors
How to get complete address from latitude and longitude?
Open PDF in Google Drive with Intent in Android - RRutors
Hide/Disable soft keyboard on Activity launch: Android
How to avoid multiple button click at same time in android?
What is the Different Between val and var in Kotlin?
How do I check in SQLite whether a table exists?
Set Activity to Fullscreen Mode in Android - RRutors
What is Android Fragments?
How to Generate signed apk with android studio
How to convert DP to Pixel and Pixel to Dp?