I'm calling finish()
but my activity keeps on going.
I have an activity which is invoked by a menu from the main activity screen. In my activity's onCreate()
method I have the following code fragment:
// Make sure there are some events in the list.
if (theEventArrayList.isEmpty()){
Toast.makeText(this, "Event List is empty", Toast.LENGTH_LONG).show();
finish();
}
SummarizeCurrentEvent();
graphEvents();
If the list is empty it puts up the Toast, and I can set breakpoint on the call to finish()
. If I step from that in the debugger it goes to straight to SummarizeCurrentEvent()
. I thought finish()
would exit the activity. Is this not the case? Where can I find out more information about this method?