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
Fix Behavior Subclass BottomSheetBehavior Exception - RRutors
How to find Android Device UDID or unique ID?
How to install/ uninstall apk by command line ADB
Hide/Disable soft keyboard on Activity launch: Android
Symmetric vs Asymmetric Encryption in Android Server - RRutors
ERR_ACCESS_DENIED in Android Webview with sdk 30
How can i comment inside xml file in android studio?
How To Set Text Color Programmatically Android TextView?
How to get screen size (width,height) in Android?
INSTALL_FAILED_INVALID_APK: Split lib_slice_9_apk was defined multiple times. It is possible that th
What is Android?
How to Generate signed apk with android studio
What are the notifications available in android?
Decompile APK Files: How to Get Source Code - RRutors Guide
What happens next when the device switches between portrait and landscape?
How to check Android version?
How do I generate random numbers in Dart?
Fix Error: Use JsonReader.setLenient(true) for Malformed JSON
What is Intent? What is the difference between an implicit intent and an explicit intent?
Fix Play Store Rejection Due to SMS Permission - RRutors
Open PDF in Google Drive with Intent in Android - RRutors
How to get a contact image using a phone number in android?
Emulator: emulator: ERROR: Can't find 'Linux version ' string in kernel image file: Andr
Add Jar/Library Files as Dependency in Android Studio
How do i load image from drawable folder in Jetpack Compose?
Android Studio project R can't find
How to validate email address in Android with Kotlin?
What is "shared preferences" in Android ?
How to reduce APK package size?
What is Context?
Check List for Generate Signed APK Android
How to convert DP to Pixel and Pixel to Dp?
Set Activity to Fullscreen Mode in Android - RRutors
What are Android Versions available?
Fix Duplicate Files in APK Build.gradle Issue - RRutors
How to get complete address from latitude and longitude?
Key Points to remember while develop the Android Application.
How to Exit android app on back pressed?
What is NetworkOnMainThread Exception?
Extract Date and Time from Long Type Variable - RRutors