Async set fragment when app invisible
See original GitHub issueWhen I receive a response from the server, I create a new fragment. If the application is minimized I get an error
io.reactivex.exceptions.OnErrorNotImplementedException: Can not perform this action after onSaveInstanceState
public void render(LogoViewState logoViewState) {
if (logoViewState instanceof LogoViewState.LoadingState) {
statusView.setText("Connecting...");
} else if (logoViewState instanceof LogoViewState.DataState) {
statusView.setText(logoViewState.toString());
if (getActivity() != null) {
((MainActivity)getActivity()).showHomeFragment();
}
}
}
Issue Analytics
- State:
- Created 6 years ago
- Comments:26 (11 by maintainers)
Top Results From Across the Web
Is it possible to make a fragment transaction in background? If ...
Suppose the application is background, the async task is running every 4 secs and if I get 'Cancelled' while the app is still...
Read more >Fragment lifecycle - Android Developers
The onAttach() callback is invoked when the fragment has been added to a FragmentManager and is attached to its host activity.
Read more >FragmentTransaction.hide()- findings | by Nav Singh - Medium
What happens when we call hide on any fragment transaction : It hides an existing fragment. It will cause the view to be...
Read more >Building dynamic user interfaces in Android with fragments
To define a new fragment you either extend the android.app. ... Fragment becomes not visible. ... Adding fragments statically to the layout file....
Read more >Async Fragments: Rediscovering Progressive HTML ...
At eBay, we take site speed very seriously and are always looking for ways to allow developers to create faster-loading web apps.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Yes, i have already said in a previous comment, that lifecycle should be between onStart() and onStop() and that I will fix it soon. Thanks for providing your feedback, logs and help!
DrobyshevAlex notifications@github.com schrieb am So., 2. Juli 2017, 21:07:
Yeah, currently Mosby uses onCreateView() and onDestroyView() … I might change that to solve this issue
DrobyshevAlex notifications@github.com schrieb am Do., 29. Juni 2017, 21:42: