0
我想知道如何使应用程序重新启动完全点击一个首选项 。你能给我一些代码片段吗?我会 像书面重新启动它的偏好是点击重启 应用完全完全重新启动应用程序android
我想知道如何使应用程序重新启动完全点击一个首选项 。你能给我一些代码片段吗?我会 像书面重新启动它的偏好是点击重启 应用完全完全重新启动应用程序android
试试这个..
Intent i = new Intent(this, Home.class);
i.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
startActivity(i);
finish();
为什么你认为你需要这个? –
只是因为我需要重新启动我的应用程序的可能性 –
试试这个。 (在将来使用搜索) [http://stackoverflow.com/questions/2470870/force-application-to-restart-on-first-activity-android/3772987#3772987][1] [1]:http://stackoverflow.com/questions/2470870/force-application-to-restart-on-first-activity-android/3772987#3772987 – Vyacheslav