Android的 - 这是不是可以禁用长按的home键,以避免任务管理器? [英] Android - Is It possible to disable the long click of home button to avoid the task manager?

查看:599
本文介绍了Android的 - 这是不是可以禁用长按的home键,以避免任务管理器?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我要寻找一种方法来禁用任务管理器窗口,一旦上了home键我长preSS。 我设法禁止其它设备键(如音量,菜单等)和正常点击home键,因为我默认的发射器,但我不知道如何禁用任务管理器! 即使是幼儿锁儿童应用程序显示û任务管理器屏幕下长按,所以我认为这是不容易做到。 我看到了几个答案说我不应该禁用任务管理器,但我想从另一个键而不是长按的主页按钮拥有它。 如果需要,将解决我的问题,我可以扎根。 请帮忙。

I am looking for a way to disable the task manager window once I long press on the home button. I managed to disable other device keys (such as volume, menu etc) and the normal click on the home button as I am the default launcher, but I don't know how to disable the task manager! Even Toddler Lock kids app show u the task manager screen following long click, so I assume it isn't easy to do so. I saw few answers say I shouldn't disable the task manager, but I want to have it from another key instead the long click on home button. If needed and will solve my problem, I can be rooted. Please help.

我发现了一种与Android 2.3.5这样做: <一href="http://stackoverflow.com/questions/10025660/override-home-and-back-button-is-case-a-boolean-is-true/10025904#10025904">Override家庭和后退按钮的情况下,布尔是真实的 (我用的是一块来自hotveryspicy code) 但是,正如写在这个环节,这个解决方案是不工作了Android 4.0.3 u能帮助我找到一个4.0.3的解决方案呢?

I found a way to do so with Android 2.3.5: Override home and back button is case a boolean is true (I used the piece of code from hotveryspicy) But, as written in this link, this solution isn't working with Android 4.0.3 Can u help me to find a solution for 4.0.3 as well?

推荐答案

要避免在长按home键,最近应用程序对话,你可以听您的活动的重点。当你的活动失去焦点,触发一个 Intent.ACTION_CLOSE_SYSTEM_DIALOGS 意图。

To avoid the recent app dialog on the long click home button, you can listen on focus of your activity. When your activity is loosing focus, fire an Intent.ACTION_CLOSE_SYSTEM_DIALOGS intent.

样品code在这里:<一href="http://www.juliencavandoli.com/how-to-disable-recent-apps-dialog-on-long-$p$pss-home-button/">http://www.juliencavandoli.com/how-to-disable-recent-apps-dialog-on-long-$p$pss-home-button/

我希望这将帮助你:)

这篇关于Android的 - 这是不是可以禁用长按的home键,以避免任务管理器?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆