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 a contact image using a phone number in android?
FragmentPagerAdapter deprecated, Since API 27.1.0 FragmentPagerAdapter is deprecated.
What is the Different Between val and var in Kotlin?
What is ANR in android?
How to avoid multiple button click at same time in android?
How to copy database from assets folder in android using kotlin
How to check Android version?
Fix Duplicate Files in APK Build.gradle Issue - RRutors
How To Set Text Color Programmatically Android TextView?
How to get an image resource by it's name in android?
Extract Date and Time from Long Type Variable - RRutors
Open PDF in Google Drive with Intent in Android - RRutors
How to Use Deprecated Handler() in Android - RRutors Guide
How to convert milli seconds to hours, minutes and seconds in Android?
What is Intent? What is the difference between an implicit intent and an explicit intent?
Hide/Disable soft keyboard on Activity launch: Android
Permission denied for window type 2010 in Marshmallow device
How to get complete address from latitude and longitude?
Emulator: emulator: ERROR: Can't find 'Linux version ' string in kernel image file: Andr
Invoke-customs are only supported starting with android 0 --min-api 26
How can i comment inside xml file in android studio?
How to start a new activity on button click
What is ANR? How to avoid and resolve it?
How to reduce APK package size?
How do i load image from drawable folder in Jetpack Compose?
What is the difference between match_parent and fill_parent?
What is NetworkOnMainThread Exception?
What are the notifications available in android?
Add Jar/Library Files as Dependency in Android Studio
ERR_ACCESS_DENIED in Android Webview with sdk 30
Decompile APK Files: How to Get Source Code - RRutors Guide
How to stop EditText focus at Activity startup in Android?
How to convert DP to Pixel and Pixel to Dp?
FCM Not Receiving Notifications in Android - RRutors
What are Android Versions available?
How to Get bitmap from drawable: Android
Fix Error: Use JsonReader.setLenient(true) for Malformed JSON
Fix Play Store Rejection Due to SMS Permission - RRutors
How do I check in SQLite whether a table exists?
Fix Behavior Subclass BottomSheetBehavior Exception - RRutors