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
INSTALL_FAILED_INVALID_APK: Split lib_slice_9_apk was defined multiple times. It is possible that th
Duplicate files during packaging of APK” build.gradle issue: Android Studio
Android Activity FullScreen - How to set activity to fullscreen mode in Android?
How to convert milli seconds to hours, minutes and seconds in Android?
How do I generate random numbers in Dart?
Emulator: emulator: ERROR: Can't find 'Linux version ' string in kernel image file: Andr
Is There A Way To Get The Source Code From An APK File? (or) How to decompile apk?
What is Context?
What is NetworkOnMainThread Exception?
How do I check in SQLite whether a table exists?
How to extract date and time from Long type variable in Kotlin on Android "
ERR_ACCESS_DENIED in Android Webview with sdk 30
How to Generate signed apk with android studio
How to get an image resource by it's name in android?
How to convert DP to Pixel and Pixel to Dp?
ERROR Android emulator gets killed when I try to run my application and choose an emulator it ret
How to save activity State in Android?
Check List for Generate Signed APK Android
What are the notifications available in android?
Invoke-customs are only supported starting with android 0 --min-api 26
How To Set Text Color Programmatically Android TextView?
How can i comment inside xml file in android studio?
Intent for Drive PDF Viewer - How to open PDF in Google Drive with intent
How to start a new activity on button click
How to find Android Device UDID or unique ID?
Android Studio project R can't find
What is Intent? What is the difference between an implicit intent and an explicit intent?
Key Points to remember while develop the Android Application.
How to stop EditText focus at Activity startup in Android?
FragmentPagerAdapter deprecated, Since API 27.1.0 FragmentPagerAdapter is deprecated.
What is Android Fragments?
What is ANR in android?
What happens next when the device switches between portrait and landscape?
What are symmetric and asymmetric encryption in the way Android interacts with the server?
What is "shared preferences" in Android ?
What are Android Versions available?
How to avoid multiple button click at same time in android?
How to Get bitmap from drawable: Android
'constructor Handler()' is deprecated. Deprecated in Java, How to use Handler() class in And
How to get a contact image using a phone number in android?