作者 主題: Android Intent問題  (閱讀 6281 次)

0 會員 與 1 訪客 正在閱讀本文。

vup0649

  • 可愛的小學生
  • *
  • 文章數: 28
    • 檢視個人資料
Android Intent問題
« 於: 2010-12-21 23:53 »
做2個頁面互相傳送訊息在第2個頁面,當中的old1怎麼不能記錄之前的訊息 ???

代碼: [選擇]
Bundle extras = getIntent().getExtras();
          if (extras != null) {
               TextView textView2 = (TextView)findViewById(R.id.view2);
  CharSequence old1 = textView2.getText();
  textView2.setText(""+old1+extras.getCharSequence("TEXT2")+extras.getCharSequence("TEXT")+"\n");
          }
« 上次編輯: 2010-12-29 14:24 由 vup0649 »