[英]How to enable back button of phone to go back to previous activity without enabling back button icon on action bar?
Suppose I move to another activity from my current one and then I need to go back to previous activity by pressing the back button originally present in the phone along with a home button and menu button.假设我从当前的活动移动到另一个活动,然后我需要通过按下手机中最初存在的后退按钮以及主页按钮和菜单按钮来返回上一个活动。 I have disabled my Action Bar and I don't want to enable it .
我已禁用我的操作栏,我不想启用它。 Nor I want to create an icon in my activity that represents back .
我也不想在我的活动中创建一个代表back的图标。
Please Help!请帮忙!
to initiate the back operation you can call要启动后退操作,您可以调用
super.onBackPressed();
from your activity.从你的活动。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.