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
Android FCM not receiving notifications when app is removed from background
How do i load image from drawable folder in Jetpack Compose?
How to avoid multiple button click at same time in android?
How to add jar/library files as a dependency in Android studio gradle file
What is Context?
What are the notifications available in android?
Hide/Disable soft keyboard on Activity launch: Android
Intent for Drive PDF Viewer - How to open PDF in Google Drive with intent
What is the Different Between val and var in Kotlin?
Could not inflate Behavior subclass android.support.design.widget. BottomSheetBehavior How resolve
How to validate email address in Android with Kotlin?
Android Activity FullScreen - How to set activity to fullscreen mode in Android?
Permission denied for window type 2010 in Marshmallow device
ERROR Android emulator gets killed when I try to run my application and choose an emulator it ret
How to convert milli seconds to hours, minutes and seconds in Android?
How to save activity State in Android?
Is There A Way To Get The Source Code From An APK File? (or) How to decompile apk?
What is NetworkOnMainThread Exception?
How to get an image resource by it's name in android?
How to get complete address from latitude and longitude?
How to copy database from assets folder in android using kotlin
ERR_ACCESS_DENIED in Android Webview with sdk 30
INSTALL_FAILED_INVALID_APK: Split lib_slice_9_apk was defined multiple times. It is possible that th
How to get screen size (width,height) in Android?
How To Set Text Color Programmatically Android TextView?
What is Android Fragments?
Duplicate files during packaging of APK” build.gradle issue: Android Studio
What is Android?
How to Get bitmap from drawable: Android
FragmentPagerAdapter deprecated, Since API 27.1.0 FragmentPagerAdapter is deprecated.
Explain Fragment Life Cycle
How do I generate random numbers in Dart?
What is the difference between match_parent and fill_parent?
'constructor Handler()' is deprecated. Deprecated in Java, How to use Handler() class in And
How to stop EditText focus at Activity startup in Android?
Android Studio project R can't find
How to start a new activity on button click
How to check Android version?
What are Android Versions available?
How to Generate signed apk with android studio