如何将价值从第一个活动传递到第三个活动 [英] How to pass value from 1st activity to 3rd activity
本文介绍了如何将价值从第一个活动传递到第三个活动的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我希望将值从第一个活动传递到第三个活动.
I wish to pass the value from 1st activity to 3rd activity.
我的第一个活动:CustomizedListview
第二个活动是:SingleMenuItemActivity
第三个活动是:InsertionExample
在这里,我必须将 Orderid 值从 CustomisedListView(第 1 个)活动传递给 InsertionExample(第 3 个)活动.
Here I have to pass the orderid value from CustomisedListView (1st) activity to InsertionExample (3rd) activity.
我怎样才能通过这个?我已将 orderid 值从第一个活动传递到第二个活动.但我不能将它从第一个活动传递到第三个活动.请帮帮我.
How can I pass this? I have passed orderid value from 1st activity to second activity. But I can't pass it from 1st activity to 3rd activity. Please help me.
推荐答案
试试这个
Intent intent=new Intent(CustomizedListview.this,InsertionExample.class);
intent.putExtra("orderid",getOrderid);
startActivity(intent);
在你的第三个活动中
Bundle bundle = data.getExtras();
String getOrderId = bundle.getString("orderid");
这篇关于如何将价值从第一个活动传递到第三个活动的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文