Friday, February 14, 2014
How to destroy the specified Activity?
Suppose there are three Activity, namely A, B, C from A into B, then from B into C, when viewed from an Activity to another activity when the previous Activity is not destroyed, but in the last Activity interface in C Unified destroy A and B, how do? Ask the great God.<-! Main posts under Banner (D4) -><-! Posts under the main text (D5) ->
Reply:
Then you startActivity it, then a layer onActivityResult
Then is finish
Reply:
startActivityForResult
Reply:
There are a number of ways:
1, made broadcasts, when the starting C interface to send broadcast notifications A and B perform their finish () to destroy itself.
2, each time Intent startActivity added Bundle contains its own Activity instance of an object, so to C after, with the object you can call directly to the finish
Reply:
. activity name instance.finish (); anywhere, destroy this activity, the code posted not give me all of the points,,,
Reply:
Forgot to say that I remember in that activity's onCreate () method which write instance = this;, so as to call that method in any activity in the destruction of activity, to the whole of it, the pro,,,
Reply:
There is no way to achieve, inactive activity Manager does not accept broadcast messages. Excuse me, you do not want to quit in C, the entire application?
Reply:
Testing can be achieved
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment