【发布时间】:2013-04-07 18:22:26
【问题描述】:
我的代码中有 4 个数组,每次用户向 edittext 写入内容时,我想将该字符串存储在其中一个数组中,我尝试使用 toCharArray 方法,但我不知道如何定义数组字符串应该放在 :S
String [] array7 = {"Hey","Was Up","Yeahh"};
TextView txtV1,txtV2;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.layouttry);
txtV1=(TextView)findViewById(R.id.textView1);
txtV2=(TextView)findViewById(R.id.textView2);
Bundle extras = getIntent().getExtras();
String value = extras.getString("Key"); // this value I want to add to the stringarray
【问题讨论】:
-
一些代码肯定会让这个问题变得有意义。
-
谢谢 :) 这很有帮助!!
-
他是认真的。您的问题不清楚,请将您的代码复制并粘贴到问题中,或者至少尝试更具体一些 - 数组是什么类型,您将如何决定每个字符串的数组等等。
-
您不知道谁否决了您的问题。可能是别人。它是本网站的一部分,发生在每个人身上。甚至我... :)
标签: java android arrays string add