You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The orientation is changed, but it's the previous screen.
I think when ViewPresenter.onLoad, the screen-view is not fully attached.Too soon to request orientation changes, may interrupt the attach-process.
Thats coz the traversal hasn't completed for the new screen and screen orientation causes the activity to be recreated, which makes the old history be restored. You can try to make the newer history be stored and let the orientation dictate the dispatching:
Hook into the onTraversalCompleted callback in your dispatcher to invoke any necessary orientation changes after the traversal completes, i.e. queue it up
Short-circuit the traversal (call onTraversalCompleted) if there is a orientation change required and let the orientation change construct the screen with the new history.
Instead of doing a delay post just posting on the UI thread suffices.
Hi, I manage all my app screens in one activity using mortar & flow.
But I got a problem when I have a different orientation screen:
I try to invoke this to change orientation in ViewPresenter.onLoad();
The orientation is changed, but it's the previous screen.
I think when ViewPresenter.onLoad, the screen-view is not fully attached.Too soon to request orientation changes, may interrupt the attach-process.
So I add a delay with handler,
It worked, the orientation changed, and the screen is right.
But a delay make the experiences miserable.
I'm new to Mortar & path, please help me to solve this problem, thanks!
The text was updated successfully, but these errors were encountered: