I want to know how can I save all changes in an activity and restore them?
for example:
I have a list view in my activity which have elements like String and image.
and I can delete items of this list view. Now I want if I deleted or created new list view items in my activity and closed app, in next time that I opened app all changes be loaded from storage of device.
is there any way to do this?
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_custom_layout_dialogs);
dialogsList = (DialogsList) findViewById(R.id.dialogsList);
Button adddialog = (Button)findViewById(R.id.btn_dialog);
adddialog.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
initAdapter();
}
});
savedInstanceState.clone();
}