Android proper use of setId()?
I have a series of activities that share a database. In the primary activity the user will be doing things will the program automatically logs data into the db. This continues until the user would like to view the database by starting the view database activity. How I have it set up is that onPause will close the database so the the DBViewer onStart() will reopen it. Inefficient but I can't think of a better way to do it. Any who, on pa开发者_开发技巧use is never being called. All the threads of the Activity A are still running as Activity B begins onStart(). Any clues or help would be appreciated.
~Aedon
Take a look at the sample NotePad app included in the SDK or the NotePad tutorial for the specific code you need. You should also use Activity.startManagingCursor(Cursor c)
so you don't have to manage the cursor's lifecycle.
精彩评论