开发者

Calling onResume in Android's activity

开发者 https://www.devze.com 2023-03-05 22:13 出处:网络
is it ok in an activity\'s procedure to force the onResume event by calling this.OnResume() ? Or should I implement another procedure that\'s called by both OnResume and by the first member开发者_Stac

is it ok in an activity's procedure to force the onResume event by calling this.OnResume() ? Or should I implement another procedure that's called by both OnResume and by the first member开发者_StackOverflow社区 ?


Implement another procedure that's called in your override of onResume(). The latter is not intended to be called by you, it's a convenience method that tidies up or readies the activity when its state changes to resume. A lot like onCreate() through to onDestroy().


What @SK9 said, but also especially because you must call super.onResume() when you override the onResume method, so you're not in control what happens in the background (views getting refreshed, etc).

0

精彩评论

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