@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_sales_info);
ed_unitprice=(EditText)findViewById(R.id.ed_unitprice);
dt_orderdate=(DatePicker)findViewById(R.id.dt_orderdate);
Spin_prdct = (Spinner)findViewById(R.id.spin_prdct);
Spin_cust_name_sales=(Spinner)findViewById(R.id.Spin_cust_name_sales);
Spin_uom=(Spinner)findViewById(R.id.Spin_uom);
btn_nxt_order=(Button)findViewById(R.id.btn_nxt_order);
}
public void onClick(View v)
{
int day = dt_orderdate.getDayOfMonth();
int month = dt_orderdate.getMonth();
int year = dt_orderdate.getYear();
String ans= String.valueOf(year)+String.valueOf(month)+String.valueOf(day);
String[] prdct=Spin_prdct.getSelectedItem().toString().replace("|", ",").split(",");
String[] name=Spin_cust_name_sales.getSelectedItem().toString().replace("|", ",").split(",");
String[] uom=Spin_uom.getSelectedItem().toString().replace("|", ",").split(",");
ArrayList<bundle> arr4 = new ArrayList<bundle>();
Intent myintent=new Intent(SalesInfo.this,Orderconform.class);
Bundle bnd=new Bundle();
bnd.putSerializable("temp", arr4);
bnd.putString("ed_unitprice", ed_unitprice.getText().toString());
bnd.putString("ans", ans.toString());
bnd.putString("Spin_prdct", prdct[0].toString());
bnd.putString("Spin_cust_name_sales",name[0].toString());
bnd.putString("Spin_uom", uom[0].toString());
arr4.add(bnd);
myintent.putExtras(bnd);
SalesInfo.this.startActivity(myintent);
}
Qestion1: Is this correct way to store value in arraylist(bundle)??
Question2: How can I retrieve this arraylist(bundle) in another activity??
Question3: How can I show this arraylist in datagridview??
Note: I am very new to android please tell me the answers very clearly please