我在我的代碼中有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
一些代碼肯定會使這個問題有意義。 – christopher 2013-04-07 18:23:11
謝謝:)這是非常有幫助的! – Marques 2013-04-07 18:25:40
他的意思是。你的問題並不清楚,將你的代碼複製並粘貼到問題中,或者至少試着更具體一些 - 數組是什麼類型,你將如何決定每個字符串的數組等等。 – 2013-04-07 18:31:21