How to exit from the application and show the home screen?

后端 未结 20 2281
伪装坚强ぢ
伪装坚强ぢ 2020-11-22 09:45

I have an application where on the home page I have buttons for navigation through the application.

On that page I have a button \"EXIT\" which when clicked should t

20条回答
  •  执念已碎
    2020-11-22 10:22

    first finish your application using method finish();

    and then add below lines in onDestroy for Removing Force close

    android.os.Process.killProcess(android.os.Process.myPid());
    super.onDestroy();
    

提交回复
热议问题