我使用 putExtra 从Activity A中发送TextViews,然后再发送到TableRow 中的Activity B里边。接下来我可以使用SavePreferences来保存view。现在的问题是我可以在Activity A中放入一些entries,然后发送到Activity B,如何在 Activity B中创建一个新的TableRow,还不毁坏之前保存的那个?
TableLayout01 = (TableLayout) findViewById(R.id.TableLayout01);
TableRow tableRow1 = new TableRow(this);
Intent in = getIntent();
if (in.getCharSequenceExtra("blah") != null) {
final TextView resultTextView = new TextView(this);
resultTextView.setText(in.getCharSequenceExtra("blah"));
tableRow1.addView(resultTextView);
Intent is = getIntent();
if (is.getCharSequenceExtra("no") != null) {
final TextView date = new TextView(this);
date.setText(is.getCharSequenceExtra("no"));
tableRow1.addView(date);
TableLayout01.addView(tableRow1, new TableLayout.LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.WRAP_CONTENT,1.0f));