Search code examples
androidonclickondestroy

Android: after resuming from onDestroy() , an onclicklistener is not responding


I don't know if these are related yet, but I have an app that won't let me click one of the buttons after resuming from onDestroy()

is this a known issue? the listeners are set onCreate()

and never set to null


Solution

  • onDestroy is the end of the life cycle for an activity. This means that the next time your activity is opened it is not "resumed" it is being created. This may be a bit confusing because even though the activity is being recreated onResume is still called. You might want to take a look at the activity lifecycle for a better description of what is actually happening as your activity moves through the different activity states.