Android 将系统的back键模拟成为home键的功能
16lz
2021-01-23
Android 将系统的back键模拟成为home键的功能
@Overridepublic void onBackPressed() { Intent intent = new Intent(Intent.ACTION_MAIN); intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); intent.addCategory(Intent.CATEGORY_HOME); startActivity(intent);}
参考网址:https://www.cnblogs.com/tony-yang-flutter/p/androidbacktohome.html
更多相关文章
- Android 系统功能设置菜单 LinearLayout与relativeLayout的实现
- Android 网上学习工具网址
- 一些值得收藏关注的网址---android
- Android 7.0 移除设置中的某些项(辅助功能、流量使用情况、位置信
- android 自动更新网址保存
- 修改Android framework定制重启功能
- Android 5.1部分apk的升级或缓存功能无效
- android 将鼠标右键点击事件改为点击后返回功能
- Android 无障碍辅助功能AccessibilityService(2)