android - How can I tell if a Dialog is being Stopped by it closing or by the application being minimized? -


i implement dialog should update calling activity when closed. however, i've found updating activity when entire application minimized, not acceptable purposes.

the update activity occurs in dialog's onstop() method, called either when dialog closed or application stopped. how can handle things differently based on whether dialog closed or application stopped? thanks!

for more context, here piece of dialog's onstop(), resumes timer of underlying activity. don't want timer resumed if user leaving app.

if (activity instanceof quizactivity) {             if( ((quizactivity) activity).gettimer() == null) {                 ((quizactivity) activity).resumetimer();             }         } 

i think solved this. dialog's onstop() being called manually activity's onstop(). put call pausetimer() method after calling dialog's onstop() in activity's onstop(). effectively, dialog resuming timer , activity pausing again part of onstop() method. doesn't feel clean, @ least holds together.


Popular posts from this blog

javascript - Js, document.getElementById("ID").innerHTML, error -

jquery - jqGrid update specific column data with out refreshing the entire column? -

objective c - Is there a way in OCMockito to make stubs fail when an unknown method is called? -