This code works fine when i add some data into \'List model\' and restore saved data on rotation device, unfortunately after restore data and set that to model
I tried your code and it works just fine with few updates. When you perform this action
model.add(temp);
adapter.notifyItemInserted(model.size() - 1);
You are assuming the persistence of the link between the object model and the adapter datasource. This assumption is wrong, in fact if you just replace the code above with
model.add(temp);
adapter.setData(model);
adapter.notifyItemInserted(model.size() - 1);
it works fine. I hope it helped.