Created
December 7, 2019 15:26
-
-
Save user-mw/ebcf6636bfed2d2bc4bf07f7194c0631 to your computer and use it in GitHub Desktop.
FragmentActivity getLastCustom...() and onRetainCustom...()
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class FragmentActivity { | |
| // Code | |
| public Object getLastCustomNonConfigurationInstance() { | |
| NonConfigurationInstances nc = (NonConfigurationInstances) | |
| getLastNonConfigurationInstance(); | |
| return nc != null ? nc.custom : null; | |
| } | |
| public Object onRetainCustomNonConfigurationInstance() { | |
| return null; | |
| } | |
| // Code | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment