I'm having this issue in this app I'm writing. It would be confusing to explain it with all the unnecessary code and all. I'll just describe the problem taking an example.
Say there are two Activities. SearchActivity and ResultsActivity. SearchActivity has some members (like Dim lvResults As ListView) declared inside Globals.
When the user taps a button in SearchActivity, it executes a query, fetches some data and starts the ResultsActivity which displays that data in a ListView.
But If the user press the Back key and try that again, it throws the error Object should first be initialized (ListView). I guess that error pops up because the code under Globals don't get executes again when the Back key is pressed, right?
How can I avoid getting this error?
Thank you
Say there are two Activities. SearchActivity and ResultsActivity. SearchActivity has some members (like Dim lvResults As ListView) declared inside Globals.
When the user taps a button in SearchActivity, it executes a query, fetches some data and starts the ResultsActivity which displays that data in a ListView.
But If the user press the Back key and try that again, it throws the error Object should first be initialized (ListView). I guess that error pops up because the code under Globals don't get executes again when the Back key is pressed, right?
How can I avoid getting this error?
Thank you