W walterfn2 Member Licensed User Longtime User Jan 6, 2014 #1 I'm developing some small application, which has to run mobile "html web app" in full screen and without possibility to zoom. The problem is that once I change orientation, "html web app" is reloaded in WebView every time. So if user navigates somewhere and changes orientation it goes back to beginning of "html web app". I know about StateManager, but it is possible to save state of WebView? (Saving on Activity_Pause and loading on Activity_Resume WebView URL won't help, because "html web app" has Javascript which does some changes on Map it puts some markers and layers. Any solution for this? Thank you
I'm developing some small application, which has to run mobile "html web app" in full screen and without possibility to zoom. The problem is that once I change orientation, "html web app" is reloaded in WebView every time. So if user navigates somewhere and changes orientation it goes back to beginning of "html web app". I know about StateManager, but it is possible to save state of WebView? (Saving on Activity_Pause and loading on Activity_Resume WebView URL won't help, because "html web app" has Javascript which does some changes on Map it puts some markers and layers. Any solution for this? Thank you
W walterfn2 Member Licensed User Longtime User Jan 7, 2014 #3 NJDude said: Read THIS post Click to expand... Thank you for your reply. Solution you sent does not solve this. Page is fully reloaded after orientation changes using URL, but if user navigates through page and that changes are not represented in URL, they are gone after rotation, because page is fully reloaded. To get idea better, open standard Android web browser, open www.google.com in mobile version. Click on bottom of the page "Settings", menu should appear, now if you rotate phone, that menu will stay and page won't be reloaded. So, my question was how to do that? Thanks Upvote 0
NJDude said: Read THIS post Click to expand... Thank you for your reply. Solution you sent does not solve this. Page is fully reloaded after orientation changes using URL, but if user navigates through page and that changes are not represented in URL, they are gone after rotation, because page is fully reloaded. To get idea better, open standard Android web browser, open www.google.com in mobile version. Click on bottom of the page "Settings", menu should appear, now if you rotate phone, that menu will stay and page won't be reloaded. So, my question was how to do that? Thanks
Erel B4X founder Staff member Licensed User Longtime User Jan 7, 2014 #4 You can prevent the activity from recreating with this manifest code: Code: Copy SetActivityAttribute(Main, android:configChanges, "orientation|keyboardHidden|screenSize") The problem is that no event will fire when the orientation changes. Upvote 0
You can prevent the activity from recreating with this manifest code: Code: Copy SetActivityAttribute(Main, android:configChanges, "orientation|keyboardHidden|screenSize") The problem is that no event will fire when the orientation changes.
W walterfn2 Member Licensed User Longtime User Jan 7, 2014 #5 Erel said: You can prevent the activity from recreating with this manifest code: Code: Copy SetActivityAttribute(Main, android:configChanges, "orientation|keyboardHidden|screenSize") The problem is that no event will fire when the orientation changes. Click to expand... I tried as you said, but during building it gives error: AndroidManifest.xml:18: error: Error: String types not allowed (at 'configChanges' with value 'orientation|keyboardHidden|screenSize'). Upvote 0
Erel said: You can prevent the activity from recreating with this manifest code: Code: Copy SetActivityAttribute(Main, android:configChanges, "orientation|keyboardHidden|screenSize") The problem is that no event will fire when the orientation changes. Click to expand... I tried as you said, but during building it gives error: AndroidManifest.xml:18: error: Error: String types not allowed (at 'configChanges' with value 'orientation|keyboardHidden|screenSize').
Erel B4X founder Staff member Licensed User Longtime User Jan 7, 2014 #6 You are probably referencing an old android.jar (Tools - Configure Paths). screenSize was added in API level 13. Upvote 0
You are probably referencing an old android.jar (Tools - Configure Paths). screenSize was added in API level 13.
W walterfn2 Member Licensed User Longtime User Jan 7, 2014 #7 Erel said: You are probably referencing an old android.jar (Tools - Configure Paths). screenSize was added in API level 13. Click to expand... Yes, I used older API level. Now it's OK. Thank you! Upvote 0
Erel said: You are probably referencing an old android.jar (Tools - Configure Paths). screenSize was added in API level 13. Click to expand... Yes, I used older API level. Now it's OK. Thank you!
W walterfn2 Member Licensed User Longtime User Jan 10, 2014 #8 Erel said: You can prevent the activity from recreating with this manifest code: Code: Copy SetActivityAttribute(Main, android:configChanges, "orientation|keyboardHidden|screenSize") The problem is that no event will fire when the orientation changes. Click to expand... Yes, no event is fired... Is there a way to resize webview object to fit screen after orientation changes? Thank you Upvote 0
Erel said: You can prevent the activity from recreating with this manifest code: Code: Copy SetActivityAttribute(Main, android:configChanges, "orientation|keyboardHidden|screenSize") The problem is that no event will fire when the orientation changes. Click to expand... Yes, no event is fired... Is there a way to resize webview object to fit screen after orientation changes? Thank you
Erel B4X founder Staff member Licensed User Longtime User Jan 12, 2014 #9 Try to use IME.AddHeightChangedEvent. It should be raised when the activity is resized. Upvote 0
Jmu5667 Well-Known Member Licensed User Longtime User Aug 8, 2014 #10 Hi where in the manifest file do you put the code. I have an separate activity with a webview for my help in the app. I have modified the activity's screen orientation so both modes are supported, but I want to maintain the current position in the webview. Regards John Upvote 0
Hi where in the manifest file do you put the code. I have an separate activity with a webview for my help in the app. I have modified the activity's screen orientation so both modes are supported, but I want to maintain the current position in the webview. Regards John
Erel B4X founder Staff member Licensed User Longtime User Aug 8, 2014 #11 This line should go in to the manifest editor. The first parameter should match the activity name. Upvote 0