Tollas,
First of all, there is Activity.finish(), which closes the activity.
But if the way you want your app to interact with the user doesn't fit
the way Activities are managed by Android, perhaps you can consider
switching views inside an Activity?
You can call setContent at any time to switch the layout, and obtain any
necessary UI objects for the new view hierarchy (such as buttons, etc) -
the stuff you normally do in onCreate(). Another option is to use a
ViewFlipper, this way the entire layout with all of its variations can
be loaded at once.
Then you could handle the back key to return to previous layout or view
(if using a ViewFlipper).
This might be easier to implement than trying to bend Activities life cycle.
-- Kostya
02.07.2010 23:19, Tollas пишет:
All activities are developed by me.
The NEW SEARCH button will be in all 3 activities.
B is launched from A. C is launched from B by the user (based on
button clicks).
On Jul 2, 2:13 pm, Justin Anderson<[email protected]> wrote:
Are all three activities developed by you or are B& C third-party
activities? In which Activity should this button reside? Are B& C
launched from A or are they launched separately on their own by the user?
----------------------------------------------------------------------
There are only 10 types of people in the world...
Those who know binary and those who don't.
----------------------------------------------------------------------
On Fri, Jul 2, 2010 at 1:06 PM, Tollas<[email protected]> wrote:
I have 3 activities, activityA, activityB& activityC.
I want to add a menu button NEW SEARCH that will destroy/finish all 3
and start a new activityA.
I do not want to finish the activities as they process as I want the
user to be able to navigate between the 3 unless the NEW SEARCH menu
option is chosen.
I guess basically I want to know how to finish activityB& C from
activityA.
Thanks!
--
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.
NEW! Try asking and tagging your question on Stack Overflow at
http://stackoverflow.com/questions/tagged/android
To unsubscribe from this group, send email to
[email protected]<android-beginners%[email protected]>
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
--
Kostya Vasilev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.com
--
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.
NEW! Try asking and tagging your question on Stack Overflow at
http://stackoverflow.com/questions/tagged/android
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en