Any way to disable/override the mutitask button on Galaxy Tab 4? [duplicate]

戏子无情 提交于 2019-12-05 14:14:09
Sipty

As far as I know -- no, you are not allowed to override system controls from an app.

You can probably achieve this with a ROM mod though. : )

Here are a few related links:

Android Override multitasking-key

How to ignore button click of “Recent Activity Button” in android 3.0

This code works for me. Actually, you cannot disable task button. When you press it, your activity calls onPause() method and you can move your task to the front in this method. See my answer for related question.

@Override
protected void onUserLeaveHint() {
    super.onUserLeaveHint();
    ((ActivityManager) getApplicationContext().getSystemService(Context.ACTIVITY_SERVICE)).moveTaskToFront(getTaskId(), 0);
}

@Override
protected void onPause() {
    super.onPause();
    ((ActivityManager) getApplicationContext().getSystemService(Context.ACTIVITY_SERVICE)).moveTaskToFront(getTaskId(), 0);
}
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!