0
I’ve got a Pedidocad Activity calling a Productocons, following code to open Productocons:
Intent intent = new Intent(PedidoCadActivity.this, ProdutoConsActivity.class);
intent.putExtra("activity", "pedidoCad");
startActivityForResult(intent, 2);
When I choose the item I want in Activity Productocons, I click on the button that executes this code:
setTotalItem();
setObjPedidoItens();
setDescPorcentagem();
setDescValor();
Bundle bundle = new Bundle();
bundle.putParcelable("objPedidoItem", objPedidoItem);
Intent i = new Intent();
i.putExtras(bundle);
setResult(1, i);
finish();
The problem is that when finishing Productocons for the second time to add the second product, it does not fall into onResume, it goes to onCreate, and the Listview that is added the items is restarted every time do not know why.
someone can give me this help?
– lavaprato
This happens in your Activity Pedidocad ?
– Eudes
Yes, when it comes back to Onactivityresult everything from Activity Pedidocad
– lavaprato
Try to put the same context you used in Intent: Pedidocadactivity.this.startActivityForResult
– franM