as above, is it done automatically? My list was empty once the orientation chMYanges? and nope, i need the orientation change =)
My adapter
public cl
I solved this problem using OnSaveInstanceState()
and OnRestoreInstanceState()
@Override
protected void onRestoreInstanceState(Bundle state){
super.onRestoreInstanceState(state);
name_array.addAll(state.getStringArrayList("key"));
setListAdapter(arrayAdapter);
arrayAdapter.notifyDataSetChanged();
}
@Override
protected void onSaveInstanceState(Bundle outState){
super.onSaveInstanceState(outState);
outState.putStringArrayList("key",name_array);
}
name_array
is hold in ArrayAdapter arrayAdapter = new ArrayAdapter
Now when you change from landscape to portrait and reverse, data aren't los