在b活动页面显示活动的数据 [英] Display Activity A data in Activity B page

查看:103
本文介绍了在b活动页面显示活动的数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有2个文本框,1 spinnerview并在此活动A.用户后1按钮按一下按钮,它去,我想这个活动要显示的内容,用户必须在2文本框中输入下一个活动B,选择微调视图。如何做到这一点?活动B是那种什么样的用户键入活动一个一个确认页面。

解决方案

 意向书我=新的意图(这一点,ActivityB.class);
i.putExtra(数据,editText.getText()的toString());
startActivity(ⅰ);
 

然后在ActivityB在的onCreate()

 字符串数据= getIntent()getStringExtra(数据)。
showConfirmation(数据);
 

I have 2 textbox,1 spinnerview and 1 button in this Activity A. After the user click the button, it goes to next Activity B which i want this activity to display what the user have type in the 2 textbox, choosing spinner view. How to do this? Activity B is sort of a Confirmation page of what the user typed in Activity A.

解决方案

Intent i = new Intent(this, ActivityB.class);
i.putExtra("data", editText.getText().toString());
startActivity(i);

Then in ActivityB in onCreate():

String data = getIntent().getStringExtra("data");
showConfirmation(data);

这篇关于在b活动页面显示活动的数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆