LinkedList savedDevicesNames = null;
@Override
public void onActivityCreated(Bundle savedInstanceState) {
if (D) { Log.d(TAG, "onActivityCreated"); }
super.onActivityCreated(savedInstanceState);
if (savedDevicesNames != null) {
for (String deviceNameAddr : savedDevicesNames) {
adapter.add(deviceNameAddr);
}
}
}
@Override
public void onDestroyView() {
super.onDestroyView();
savedDevicesNames = new LinkedList();
for (int i = 0; i < adapter.getCount(); i++) {
savedDevicesNames.add(adapter.getItem(i));
}
}