Fragments do not have an onRestoreInstanceState
method.
You can achieve the same result in onActivityCreated
, which receives a bundle with the saved instance state (or null).
Check the source code here.
More Related Contents:
- Google Fused Location API causing error (Android)
- How to implement onBackPressed() in Fragments?
- How to determine when Fragment becomes visible in ViewPager
- Do fragments really need an empty constructor?
- IllegalStateException: Can not perform this action after onSaveInstanceState with ViewPager
- How to transfer some data to another Fragment?
- Why fragments, and when to use fragments instead of activities?
- Programmatically go back to the previous fragment in the backstack
- How to implement RecyclerView with CardView rows in a Fragment with TabLayout
- Android Fragments. Retaining an AsyncTask during screen rotation or configuration change
- Hide/Show bottomNavigationView on Scroll
- Android: can’t replace one fragment with another
- Difference between android.app.Fragment and android.support.v4.app.Fragment
- PreferenceFragmentCompat requires preferenceTheme to be set
- android.content.Context.getPackageName()’ on a null object reference
- onClickListener does not work in fragment
- Further understanding setRetainInstance(true)
- Detect ViewPager tab change inside Fragment
- Fragment or Support Fragment?
- In Fragment on back button pressed Activity is blank
- How do you create Preference Activity and Preference Fragment on Android?
- refresh fragment UI from fragmentActivity
- findFragmentById always returns null
- isValidFragment Android API 19
- Communication between Fragments in ViewPager
- What’s the difference between detaching a Fragment and removing it?
- Is it possible to access the current Fragment being viewed by a ViewPager?
- Button Listener for button in fragment in android
- Disable multi finger touch in my app [duplicate]
- Android replace fragment still displays some of the replaced fragment