0

I try to develop an android app. I can get all contacts from phonebook to listview. But when I touch back press or button what I put under listview, it can't save.

I tried and search it but i couldn't find. Can you help me?

These are my classes.

ContactListFragmentFragment.java

ContactListFragment.java

HaveNoDisplayName
  • 8,291
  • 106
  • 37
  • 47
user3717742
  • 103
  • 1
  • 7
  • check this post out http://stackoverflow.com/questions/18605768/how-to-create-custom-contact-list-with-checkbox – karan Jul 22 '15 at 12:28
  • @KaranMer i think you understood me wrong. I try to state of listview or a hashmap when i go to other activites. – user3717742 Jul 22 '15 at 12:45
  • check this out http://stackoverflow.com/questions/16692536/good-solution-to-retain-listview-items-when-user-rotate-phone-and-keep-all-data – karan Jul 22 '15 at 12:46
  • @KaranMer i checked it but he/she used ArrayAdapter but i use SimpleCursorAdapter. – user3717742 Jul 22 '15 at 12:51
  • save value of your array in shared preferences when your activity is pausing and retrive them when its resuming – karan Jul 22 '15 at 13:06
  • @KaranMer so do you know how can disable when i changed for example from activity a to activity b and then from activity b to activity a. Activity a create again. how can i disable to destroy activity a? – user3717742 Jul 22 '15 at 13:26
  • Let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/84032/discussion-between-user3717742-and-karan-mer). – user3717742 Jul 23 '15 at 05:54

0 Answers0