thanksYou might have to save your app's UI state in onPause & restore it in onResume.
- Colin.
Search the forum for KVS. Basically you use key/value pairs to save the relevant state of each view so that it can be restored later. It seems complicated at first, but when you look into it a bit deeper it's very straightforward. For a dialog, all you'd need to do is save the title, message & button configurations when the activity pauses, then fetch those back & use them to rebuild & display the dialog when the activity resumes.thanks
how do i do it?
how do i store the entire current state and then return to it?
savig the active form and text in msgbox is not really doable i think
You may not need to do that many code changes...Thank you Colin
It seems that this will force me to a lot of modifications. the app huge so it is a big pain.
I need either block any other thing from breaking my app (doesn't seem to be logic) or a magic solution so on resume it will be really resumed without loosing anything as happens now
I will however read what you suggested...
Thanks
oopsThere are a few dialog replacement libs in the forum... chose one and give it a try!
Late to this thread...i need help...
when my app is being pushed to the background for example due to incomming call or sms, and then i load it back either from desktop icon or task manager,
any msgbox that was active on screen is gone
is there a way to make sure it will be returned complely to the same view as it was before the interruption?
if there was a msgbox on screen so the msgbox will still be on screen
thanks
Not necessarily. If the Panel (or whatever view he uses) is not visible by default & the OS kills the app while it's in the background, then the app (& the UI) will be resumed in its default start-up state - meaning the Panel won't be visible.Late to this thread...
Why use the built-in messagebox at all?
If you use a panel of your own, it will still be there when the app resumes.
True. No clever way around that , I can think of, without saving and restoring the state.Not necessarily. If the Panel (or whatever view he uses) is not visible by default & the OS kills the app while it's in the background, then the app (& the UI) will be resumed in its default start-up state - meaning the Panel won't be visible.
- Colin.
No, this is how Android works. It's up to the app to remember its state, not Android's (Android's rules, not mine/not yours).in any case - is this a system bug?
Indeed, that was the idea I came up withLate to this thread...
Why use the built-in messagebox at all?
If you use a panel of your own, it will still be there when the app resumes.
No, this is how Android works with the native dialog classBut why are msgboxes get lost? Is this a bug?
Check out B4XDialog, part of XUI Views library (an internal library)Any idea how to create such floating panel?
That will not cover the entire screen and be on top of the previous panel yet showing it?
And to create it on the fly programmatically?
No as it is based on a secondary view and that breaks the flowHere is an example.
Yes, B4xDialog will do all of this and more... but I had already written this before the @OliverA 's post appeared.
EDIT: This is a very simple example to show the technique.
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?