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 are the notifications available in android?
What is the Different Between val and var in Kotlin?
How to convert milli seconds to hours, minutes and seconds in Android?
What is Android Fragments?
What is ANR in android?
How to find Android Device UDID or unique ID?
ERR_ACCESS_DENIED in Android Webview with sdk 30
How to extract date and time from Long type variable in Kotlin on Android "
Emulator: emulator: ERROR: Can't find 'Linux version ' string in kernel image file: Andr
How do I generate random numbers in Dart?
How to Generate signed apk with android studio
What is Application?
Permission denied for window type 2010 in Marshmallow device
'constructor Handler()' is deprecated. Deprecated in Java, How to use Handler() class in And
Android Activity FullScreen - How to set activity to fullscreen mode in Android?
What is Android?
Hide/Disable soft keyboard on Activity launch: Android
What is Intent? What is the difference between an implicit intent and an explicit intent?
Could not inflate Behavior subclass android.support.design.widget. BottomSheetBehavior How resolve
What is the difference between match_parent and fill_parent?
What are symmetric and asymmetric encryption in the way Android interacts with the server?
How to save activity State in Android?
Google play store rejected my app due to SMS permission I removed SMS permission from the manifes
What is NetworkOnMainThread Exception?
Error: Use JsonReader.setLenient(true) to accept malformed JSON at line 1 column 1 path
How to install/ uninstall apk by command line ADB
Android FCM not receiving notifications when app is removed from background
How to reduce APK package size?
How to get a contact image using a phone number in android?
How to add jar/library files as a dependency in Android studio gradle file
How To Set Text Color Programmatically Android TextView?
Intent for Drive PDF Viewer - How to open PDF in Google Drive with intent
How to avoid multiple button click at same time in android?
How do i load image from drawable folder in Jetpack Compose?
Android Studio project R can't find
Duplicate files during packaging of APK” build.gradle issue: Android Studio
Explain Fragment Life Cycle
How to get complete address from latitude and longitude?
How to get an image resource by it's name in android?
How to Exit android app on back pressed?