开发者

How can I reach one activity's Intent from an another?

开发者 https://www.devze.com 2023-03-18 04:20 出处:网络
If I make for example an Intent i = new Intent(); Bundl开发者_运维问答e b = new Bundle(); b.putString(\"Number\", spinner.getSelectedItem);

If I make for example an

 Intent i = new Intent();
 Bundl开发者_运维问答e b = new Bundle();
 b.putString("Number", spinner.getSelectedItem);
 i.putExtras(b);

So If I want to reach this intent from an another activity, how Can I do this?


In Android: How do I get variables/data from one screen to another?

In the onCreate in your second activity you would get the string by calling:

getIntent().getStringExtra("Number");
0

精彩评论

暂无评论...
验证码 换一张
取 消