如何使用onResume()? [英] How to use onResume()?

查看:1746
本文介绍了如何使用onResume()?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

谁能给我一个使用 onResume()在Android的一个例子。我想知道如果我想重新开始执行什么方法的其他的onCreate()的exectuion的结束活动 onResume() ,如果我想更新数据如何把它放在 onResume()?

Can anyone give me an example that uses the onResume() in android. and I want to know if I want to restart the activity at the end of exectuion of an other what method is executed onCreate() or onResume() and if I want to update data how to put it on onResume()?

推荐答案

任何活动的重启的的 onResume()方式的执行的第一个

Any Activity restart its onResume() method executed first.

如果你的使用的这种的方法的方式如下:

if you use this method following way.

@Override
public void onResume(){
    super.onResume();
    // put your code here...

}

这篇关于如何使用onResume()?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆