Hi all, I have an activity here.
I want to click a button and then hide the activity GUI.
That is, GUI is needed and you can hide it by clicking a "Hide App" button. How can i
implement this "Hide App"?
Somebody help! Thanks in advance!
Hi all, I have an activity here.
I want to click a button and then hide the activity GUI.
That is, GUI is needed and you can hide it by clicking a "Hide App" button. How can i
implement this "Hide App"?
Somebody help! Thanks in advance!
Presumably when your user clicks the hide application button, you're going to want to show something - at the very least a show button, so the user isn't stuck without input options!
So what you really have then is two views, one with the GUI hidden.
Two approaches I can see:
To do what you want within the organizational model of android, your "program" should be written as a service, not an activity. You would then have a gui that is an activity and a client of your service, which can be started (made visible) and paused/stopped (hidden) as desired.
You could also just enable the screen lock. ;-)
That would automatically lock the screen (hide your app). And when the user unlocked the screen (using the UI and a gesture the user is already very familiar with) he would automatically get back into your app without you needing to do any extra coding.
The additional advantage of the screen lock is that it can be be password-protected, so if the user has his screen-lock already set to a password, instead of a slide bar -- he would just get the slide password thingy.