在 Android 中重新加载活动 [英] Reload activity in Android

查看:31
本文介绍了在 Android 中重新加载活动的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Android 中重新加载 Activity 是一个好习惯吗?

Is it a good practice to reload an Activity in Android?

最好的方法是什么?this.finish 然后 this.startActivity 与活动 Intent?

What would be the best way to do it? this.finish and then this.startActivity with the activity Intent?

推荐答案

你可以简单地使用

finish();
startActivity(getIntent());

从自身内部刷新Activity.

这篇关于在 Android 中重新加载活动的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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