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
What is NetworkOnMainThread Exception?
Key Points to remember while develop the Android Application.
Fix Behavior Subclass BottomSheetBehavior Exception - RRutors
How to get an image resource by it's name in android?
What are Android Versions available?
How to Get bitmap from drawable: Android
Invoke-customs are only supported starting with android 0 --min-api 26
What is the difference between match_parent and fill_parent?
How do I check in SQLite whether a table exists?
How To Set Text Color Programmatically Android TextView?
ERR_ACCESS_DENIED in Android Webview with sdk 30
What is Android Fragments?
Set Activity to Fullscreen Mode in Android - RRutors
How to convert DP to Pixel and Pixel to Dp?
Decompile APK Files: How to Get Source Code - RRutors Guide
How to start a new activity on button click
INSTALL_FAILED_INVALID_APK: Split lib_slice_9_apk was defined multiple times. It is possible that th
What is the Different Between val and var in Kotlin?
How do i load image from drawable folder in Jetpack Compose?
Permission denied for window type 2010 in Marshmallow device
Emulator: emulator: ERROR: Can't find 'Linux version ' string in kernel image file: Andr
Fix Error: Use JsonReader.setLenient(true) for Malformed JSON
Explain Fragment Life Cycle
How to get screen size (width,height) in Android?
How do I generate random numbers in Dart?
Android Studio project R can't find
How to Use Deprecated Handler() in Android - RRutors Guide
What happens next when the device switches between portrait and landscape?
How to convert milli seconds to hours, minutes and seconds in Android?
How to save activity State in Android?
What is Application?
How to stop EditText focus at Activity startup in Android?
What is ANR in android?
How to get complete address from latitude and longitude?
What is ANR? How to avoid and resolve it?
How can i comment inside xml file in android studio?
Extract Date and Time from Long Type Variable - RRutors
Add Jar/Library Files as Dependency in Android Studio
How to install/ uninstall apk by command line ADB
Fix Android Emulator Kill Error When Running Your App