I am implementing paint Application. My problem is that when i color on object.After some times screen goes to sleep.When i awake the screen, my old paint lost. I find out issue its calling OnDestroy after Onpause automatically so it clears canvas. How to stop calling Ondestroy automatically.
I am implementing paint Application. My problem is that when i color on object.After
Share
You shouldn’t try to circumvent Android’s activity workflow and memory management by avoiding
onDestroy()(in fact, I think you can’t).Use
onSaveInstanceState(Bundle)to store your current state and restore it ononCreate(Bundle), if a Bundle is provided.