Hello everyone.

I'm have an activity that generate an ArrayList of a object:

        ArrayList<PedidoItem> list = new ArrayList<PedidoItem>();
    PedidoItem objPedItem = new PedidoItem();
    objPedItem.set_Item(item.getText().toString());
    objPedItem.set_Produto(produto.getText().toString());
    objPedItem.set_Qtde(Float.parseFloat(quantidade.getText().toString()));
    
objPedItem.set_ValorUnitario(Float.parseFloat(valorunitario.getText().toString()));
    objPedItem.set_Total(Float.parseFloat(total.getText().toString()));
    list.add(objPedItem);

        Intent troca = new Intent(CadastroPedidoItem.this, 
CadastroPedido.class);
    troca.putExtra("listaItem", list);
    setResult(RESULT_OK, troca);
    CadastroPedidoItem.this.finish();

And i'm trying to get the result:

if (resultCode == RESULT_OK){
        ArrayList<PedidoItem> result = new ArrayList<PedidoItem>();
                        result = 
data.getParcelableArrayListExtra("listaItem");

To pass to the constructor adapter:

public PedidoItemAdapter(Context contexto, List<PedidoItem> pedItem) {
// TODO Auto-generated constructor stub
this.pedItens = pedItem;
this.context = contexto;
}


But I can't use getParcelableArrayList or other options... because the 
result can't be ArrayList<PedidoItem> to receive that type.

Can anyone help me?

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to