How to exit when back button is pressed?

前端 未结 12 1270
名媛妹妹
名媛妹妹 2020-11-27 11:47

When a user presses the back button on an intent, the application should quit. How can I ensure the application quits when the back button is pressed?

12条回答
  •  温柔的废话
    2020-11-27 12:03

    To exit from an Android app, just simply use. in your Main Activity, or you can use Android manifest file to set

    android:noHistory="true"
    

提交回复
热议问题