0

Anther アクティビティを渡すために複数のパラメーターを渡すにはどうすればよいですか? この方法で 2D 文字列をパラメーターとして渡し、成功しましたが、2 つのパラメーターをさらに 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