I have a list activity that does a common list activity form stuff. All of
a activity setup was being finished in a onCreate()
method@Overrideprotected vacant onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_list_streams);
Thread.setDefaultUncaughtExceptionHandler(new ExceptionHandler(this));
mActionBar = getActionBar(); mStreamListAdapter = new
StreamListRowAdapter(this, R.layout.stream_list_row); mStreamListView
= (ListView)findViewById(android.R.id.list);
mStreamListView.setAdapter(mStreamListAdapter);}I do not have onStart()
and onResume() overrides. we can successfully navigate out of this
activity formed on a menu buttons pulpy and afterwards navigate behind to
this activity. When we navigate divided from this list activity around
startActivity(newIntent), we do not call finish, though we do call finish
in a newIntent activity, when opening behind to this list activity.
Everything works fine, unless presumably a ListActivity itself or one of a
new Activities have been sitting in a credentials for a prolonged time
(i.e. we switched to another app). Long time is totalled in hours.
Sometimes (NOT always), when we come behind to my app after this delay, a
list activity does not arrangement a list, a menu is not displayed either,
only a vacant shade with a activity due displayed in a ActionBar. we
comprehend that we need to hoop opening behind to a list Activity around
onResume() (and maybe onStart()). But onResume() is always called after we
navigate behind to this list activity, how do we unequivocally know if a
variables representing a ListAdapter and ListView have indeed been damaged
by a OS and need to be recreated inside onResume(), we don't wish to
reconstruct them each time onResume() is called. Can we only check to see
if they are equal to null? It's tough to exam this, as this does not occur
unequivocally regularly.Thank You,Gary
No comments:
Post a Comment