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
You can also use http://developer.android.com/reference/android/app/Activity.html#onRetainNonConfigurationInstance()
Something like this in your Activity:
@Override
public Object onRetainNonConfigurationInstance() {
return this.m_adapter.getItems();
}
And then in your onCreate():
@Override
public void onCreate(Bundle icicle) {
super.onCreate(icicle);
// more init stuff here
sResultsArr = (ArrayList)getLastNonConfigurationInstance();
if(sResultArr == null) {
sResultsArray = new ArrayList(); // or some other initialization
}
self.m_adapter = new ResultsAdapter(home.this, R.layout.listrow, sResultsArr,home.this);
// ...
}