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 complete address from latitude and longitude?
How to copy database from assets folder in android using kotlin
What is ANR in android?
INSTALL_FAILED_INVALID_APK: Split lib_slice_9_apk was defined multiple times. It is possible that th
Fix Android Emulator Kill Error When Running Your App
What is NetworkOnMainThread Exception?
Fix Play Store Rejection Due to SMS Permission - RRutors
What is ANR? How to avoid and resolve it?
What are the notifications available in android?
Fix Behavior Subclass BottomSheetBehavior Exception - RRutors
Emulator: emulator: ERROR: Can't find 'Linux version ' string in kernel image file: Andr
Permission denied for window type 2010 in Marshmallow device
How to Get bitmap from drawable: Android
How to get a contact image using a phone number in android?
What is Android Fragments?
How can i comment inside xml file in android studio?
What is the Different Between val and var in Kotlin?
What is "shared preferences" in Android ?
Fix Error: Use JsonReader.setLenient(true) for Malformed JSON
How do i load image from drawable folder in Jetpack Compose?
What is the difference between match_parent and fill_parent?
How to Use Deprecated Handler() in Android - RRutors Guide
How to install/ uninstall apk by command line ADB
How to Exit android app on back pressed?
How to stop EditText focus at Activity startup in Android?
Explain Fragment Life Cycle
How to validate email address in Android with Kotlin?
How do I check in SQLite whether a table exists?
What are Android Versions available?
Hide/Disable soft keyboard on Activity launch: Android
Android Studio project R can't find
What is Android?
FCM Not Receiving Notifications in Android - RRutors
FragmentPagerAdapter deprecated, Since API 27.1.0 FragmentPagerAdapter is deprecated.
What is Context?
Extract Date and Time from Long Type Variable - RRutors
How to save activity State in Android?
How To Set Text Color Programmatically Android TextView?
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?