0

我如何传递超过 1 个参数来传递花药活动?我以这种方式传递我的 2D 字符串作为参数传递成功但现在我想要两个传递更多参数 semrately 现在使用 bean 类我如何发送?

 Intent j = new Intent(AgAppTransUtilityBalanceInquiry.this, AgAppTransUBIResponse.class);



         MyBean bean = new MyBean();
         bean.set2DArray(xmlResponse);
         Bundle b = new Bundle();
            b.putSerializable("mybean", bean);

            j.putExtra("obj", b);

          and get like this

         Bundle b = getIntent().getBundleExtra("obj");
                   MyBean dData = (MyBean) b.getSerializable("mybean");
                   xmlResponse =dData.get2DArray();



         public class MyBean implements Serializable{
 String[][] data = null;
 public void set2DArray(String[][] data){
    this.data = data;
 }
 public String[][] get2DArray(){
    return data;
 }
  }


             but i want pass two more parameters

             b.putString("otheraccount", otheraccount.getText().toString());
           b.putString("choicess" ,(String)provider.getSelectedItem());

            how do i pass this two more parameters seprately??
4

0 回答 0