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 Generate signed apk with android studio
What is the difference between match_parent and fill_parent?
What is Android?
How to get an image resource by it's name in android?
How to save activity State in Android?
How to avoid multiple button click at same time in android?
Emulator: emulator: ERROR: Can't find 'Linux version ' string in kernel image file: Andr
How to Exit android app on back pressed?
What is ANR? How to avoid and resolve it?
How do I check in SQLite whether a table exists?
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
Set Activity to Fullscreen Mode in Android - RRutors
How to check Android version?
Fix Duplicate Files in APK Build.gradle Issue - RRutors
Fix Behavior Subclass BottomSheetBehavior Exception - RRutors
Fix Android Emulator Kill Error When Running Your App
What are Android Versions available?
FragmentPagerAdapter deprecated, Since API 27.1.0 FragmentPagerAdapter is deprecated.
Android Studio project R can't find
How to get screen size (width,height) in Android?
What happens next when the device switches between portrait and landscape?
What is Context?
How to convert milli seconds to hours, minutes and seconds in Android?
What is "shared preferences" in Android ?
What are the notifications available in android?
How To Set Text Color Programmatically Android TextView?
Invoke-customs are only supported starting with android 0 --min-api 26
Add Jar/Library Files as Dependency in Android Studio
How to Use Deprecated Handler() in Android - RRutors Guide
How to get complete address from latitude and longitude?
What is the Different Between val and var in Kotlin?
Check List for Generate Signed APK Android
How do i load image from drawable folder in Jetpack Compose?
How can i comment inside xml file in android studio?
Key Points to remember while develop the Android Application.
How to Get bitmap from drawable: Android
How to stop EditText focus at Activity startup in Android?
How to convert DP to Pixel and Pixel to Dp?