我想在字符串数组中添加所有值,但它不起作用:
public class Info extends Activity {
private static final String TAG = "Info";
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.info);
Intent myIntent = getIntent();
Bundle b = myIntent.getExtras();
String choice = b.getString("choice");
String fname = b.getString("fname");
String lname = b.getString("lname");
String add = b.getString("add");
String coun = b.getString("coun");
String pro = b.getString("pro");
String pcode = b.getString("pcode");
Log.i(TAG,"selection: " + choice);
TextView textView = (TextView) findViewById(R.id.showmeText);
textView.append(": " + choice);
TextView textView1 = (TextView) findViewById(R.id.fname);
textView1.append(" " + fname);
TextView textView2 = (TextView) findViewById(R.id.lname);
textView2.append(" " + lname);
TextView textView3 = (TextView) findViewById(R.id.address1);
textView3.append(" " + add);
TextView textView4 = (TextView) findViewById(R.id.pro);
textView4.append(" " + pro);
TextView textView5 = (TextView) findViewById(R.id.country1);
textView5.append(" " + coun);
TextView textView6 = (TextView) findViewById(R.id.pcode);
textView6.append(" " + pcode);
}
我在 ListView 中尝试了这些所有值,但这些都不起作用,因为我在 ListView 中添加了所有 Textview。你能帮我如何在字符串数组中添加这些列表吗?