如何将价值从第一活动传递到第三活动 [英] 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值从CustomizedListView(1st)活动传递给InsertionExample(3rd)活动.
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屋!
查看全文