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
Is There A Way To Get The Source Code From An APK File? (or) How to decompile apk?
How can i comment inside xml file in android studio?
How to stop EditText focus at Activity startup in Android?
How to find Android Device UDID or unique ID?
How to get an image resource by it's name in android?
INSTALL_FAILED_INVALID_APK: Split lib_slice_9_apk was defined multiple times. It is possible that th
How To Set Text Color Programmatically Android TextView?
How to validate email address in Android with Kotlin?
How to get a contact image using a phone number in android?
Permission denied for window type 2010 in Marshmallow device
How to copy database from assets folder in android using kotlin
Hide/Disable soft keyboard on Activity launch: Android
How to convert milli seconds to hours, minutes and seconds in Android?
Key Points to remember while develop the Android Application.
ERROR Android emulator gets killed when I try to run my application and choose an emulator it ret
Duplicate files during packaging of APK” build.gradle issue: Android Studio
What is Android?
What is Application?
Emulator: emulator: ERROR: Can't find 'Linux version ' string in kernel image file: Andr
What is Intent? What is the difference between an implicit intent and an explicit intent?
How to start a new activity on button click
Error: Use JsonReader.setLenient(true) to accept malformed JSON at line 1 column 1 path
Android Studio project R can't find
How to get screen size (width,height) in Android?
How to add jar/library files as a dependency in Android studio gradle file
What are the notifications available in android?
What is ANR? How to avoid and resolve it?
Check List for Generate Signed APK Android
'constructor Handler()' is deprecated. Deprecated in Java, How to use Handler() class in And
What is ANR in android?
What is the difference between match_parent and fill_parent?
How do I generate random numbers in Dart?
Invoke-customs are only supported starting with android 0 --min-api 26
Android FCM not receiving notifications when app is removed from background
What is "shared preferences" in Android ?
How to avoid multiple button click at same time in android?
How to Exit android app on back pressed?
What happens next when the device switches between portrait and landscape?
How to get complete address from latitude and longitude?
How to Get bitmap from drawable: Android