Saturday, April 12, 2014

Ask a question of Intent putExtra method?


Ask a question of Intent putExtra method?

Activity There are three A, B, C

A first inside Intent putExtra ("1", "1"); putExtra ("2", "2"); setclass (A.this, B.class);
B inside Intent First putExtra ("3", "3"); setclass (B.this, C.class);
C inside of Intent to receive these three key right?


That is to say after the skip B A 2 which transmitted the key, B sends a skip key C, C 3 which can receive these keys do?
<-! Main posts under Banner (D4) -><-! Posts under the main text (D5) ->
Reply:
Oh, did not get.

However, in B must be new Intent () then setBundle, A parameter is the Bundle,
Reply:
Your mom gave your dad two packs of cigarettes, your father give you a lollipop, do you have your father's hand smoke it?
Reply:
Oh, not so upstairs analogy, if passed an android Intent object on the whole have, android is not a biography in the Intent object
Reply:
not a same intent
Reply:
Value every time a new intent, you can remove the bundle first intent, and then save the deposit needed to bundle, the bundle and then save to a new intent, can be
Reply:
From A -> B a new intent to get from A to B in intent, the intent of the value of 1,2 saved;
final Intent getIntent = getIntent ();
From the B -> C to create a new intent of the value added to it
1,2Intent intent = new Intent ();
intent.putExtra ("3", "3");
intent.putExtra ("1", getIntent.getStringExtra ("1"));
intent.putExtra ("2", getIntent.getStringExtra ("2"));
Two intent
in BSo in order to receive 3 C values ​​of

Reply:
You kind of thing Chartered case, the father of all the possessions gave you, of course you will be able to smoke it. . . . .
Reply:
This is not the inheritance mechanism.
Reply:
What is an object?
Reply:
Obviously only get to "3" corresponding to "3",

Because the intent A transmission defining B (setclass (A.this, B.class) ;) can receive the key-value pair ("1", "1") ("2", "2"), similarly, B intent sent defining C (setclass (B.this, C.class) ;) to receive the key to the ("3", "3")
Reply:
reference to the 9th floor k1102k27 reply:
What is an object?

Encapsulated objects, googl + Baidu

If you take again C in the key of A, then B, then your access through a Bundle, and then set, so that you can get the in C
Reply:
reference to the 11th floor ch_984326013 reply:
reference to the 9th floor k1102k27 reply:
What is an object?

Encapsulated objects, googl + Baidu

If you take again C in the key of A, then B, then your access through a Bundle, and then set, so that you can get a

You can give a Bundle access code? It is best to also add notes. . .


Reply:
No, only in reverse look through B
Reply:
cited a floor ghyghost reply:
Oh, take less.

However, in B must be new Intent () then setBundle, A parameter is the Bundle,


Really can hold more than
Reply:
reference to the 7th floor tangyunxiang reply:
franchise situation you kind of thing, Dad gave you all the possessions, of course you will be able to smoke it. . . . .

Really can hold more than
Reply:
cited a floor ghyghost reply:
Oh, take less.

However, in B must be new Intent () then setBundle, A parameter is the Bundle,

Just sorry ah, that's not on the first floor, second floor

No comments:

Post a Comment