Odświeżanie ArrayAdapter onResume [notifyDataSetChanged () nie działa]

Tworzę aplikację listy kontaktów za pomocą Fragmentów, gdzie jeden fragment to lista nazwisk na liście kontaktów, a druga to pozostałe szczegóły.

Oto klasa, która wyświetla listę nazw

public class MyListFragment extends ListFragment {

private ContactStorage contactStorage = new ContactStorage();

public final static String TAG = "FRAGMENTS";
private MainActivity parent;
ArrayAdapter<String> adapter;

ArrayList<String> entries = new ArrayList<String>();

String array[];

public View onCreateView(LayoutInflater inflater, ViewGroup container,
        Bundle savedInstanceState) {

    View v = inflater.inflate(R.layout.list_layout, null);
    parent = (MainActivity) getActivity();
    entries = contactStorage.getContactListNames();

    adapter = new ArrayAdapter<String>(getActivity().getApplicationContext(), 
            android.R.layout.simple_list_item_1, entries);

    setListAdapter(adapter);
    Log.d(TAG, "Adapter created");
    array = contactStorage.getContactDetails();
    return v;

}

@Override
public void onResume() {

    super.onResume();
    entries = contactStorage.getContactListNames();
    adapter.notifyDataSetChanged();
    Log.d(TAG, "List Frag Resumed");

}
}

Problem, który mam, polega na tym, że adapter Array nie jest odświeżany po wznowieniu.

Gdy ekran jest obracany, jego poprawne działanie, jak onCreateView (), jest uruchamiane ponownie, ale potrzebuję go do odświeżenia naResume. Sprawdziłem ładowanie tej witryny i nie znalazłem nic poza „użyciem notifyDataSetChanged ()”, co nie działa.

questionAnswers(2)

yourAnswerToTheQuestion