从字符串后面捆绑 [英] String back from Bundle

查看:132
本文介绍了从字符串后面捆绑的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

从1日活动

Intent IntentButton = new Intent();
IntentButton.setClass(this, PaliActivity2.class);
IntentButton.putExtra("EditText123", EditText1.getText().toString());
startActivity(IntentButton);

第二届活动

protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);                     
setContentView(R.layout.nextscreen);
Bundle BundleFrom1 = getIntent().getExtras();

如何获得字符串从包回来从活性1收到?

How to get the String back from Bundle received from Activity1???

推荐答案

解决方案:

String s = BundleFrom1.getString("EditText123");

请与命名追逐更低的变量开始

please name the variables with lower chase beginning

这篇关于从字符串后面捆绑的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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