Android Question Persist TabStrip through Orientation Change

DawningTruth

Active Member
Licensed User
This is not the correct way. You should instead store the state with StateManager and recreate it.
Thx Erel, the challenge I have is that I need to preserve the state with different UI elements. I can see how this can work with recreating a TabStrip view. But it does not seem to work with WebView. Or at least perhaps I don't know how to make it work.

The reason I need to preserve state for the WebView is I need to preserve the BackForward History. So when the person rotates the phone, they must remain on the same page, but also have access to all the previous websites viewed in that session.

This has to happen within the context of a number of different views like TabViews, Labels, Videos etc... It looks like this may not be as straightforward as I thought. Trust me to push the platform to is limits :rolleyes:.

I have attached a sample project which includes a WebView and the State Manager. If you can please advise on how to preserve the WebView state, then I should be able to come right with the rest.
 

Attachments

  • WebviewOrientation.zip
    11.1 KB · Views: 222
Upvote 0

DawningTruth

Active Member
Licensed User
Thx Erel, the challenge I have is that I need to preserve the state with different UI elements. I can see how this can work with recreating a TabStrip view. But it does not seem to work with WebView. Or at least perhaps I don't know how to make it work.

The reason I need to preserve state for the WebView is I need to preserve the BackForward History. So when the person rotates the phone, they must remain on the same page, but also have access to all the previous websites viewed in that session.

This has to happen within the context of a number of different views like TabViews, Labels, Videos etc... It looks like this may not be as straightforward as I thought. Trust me to push the platform to is limits :rolleyes:.

I have attached a sample project which includes a WebView and the State Manager. If you can please advise on how to preserve the WebView state, then I should be able to come right with the rest.
Ok, I will open a new question about webview.
 
Upvote 0
Top