开发者

Returning to Screen and updating the View

Having issues with screen progress.

I have a screen displaying information from a database. I have a button on this screen which goes to an add screen

This new screen saves some new info to the database

Once the info is saved I am looking to g back to the first screen and update the screen with the new data

What I am trying to avoid is creating a new activity so when you click back it does not go though the add screen again

Thanks for your Ti开发者_开发百科me


Once you're done with the addScreen Activity call finish(). That will cause the AddScreen Activity to clean up (calling all of the end of lifecycle routines: onPause, onStop, etc).

In your original screen you'll need to load the data from the database again from onResume(). Incidentally, this means you should have all your database code in onResume() instead of onCreate().

Hope this helps.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜