android home键
引用: http://www.linuxidc.com/Linux/2012-01/51332.htm 当我们从Home点击ShortCut图标启动一个应用程序后,这个应用程序打开了很多个Activity,假设顺序为A,B,C,然后我们按Home键,再次从桌面用图标启动这个应用程序,我们会发现显示的是刚才的C,而不是A。这里我们普遍的想法是按Home键是让程序退到后台,然后让桌面显示出来。那么我们就来看看Home键到底是怎么回事。 在Framework中我们找到源码,我们首先在interceptKeyBeforeDispatching这个方法中找到Home按键代码如下 [java] // If the HOME button is currently being held, then we do special // chording with it. if (mHomePressed) { // If we have released the home key, and didn't do anything else // while it was pressed, then it is time to go home! if (keyCode == KeyEvent.KEYCODE_HOME) { if (!down) { mHomePressed = false ; if (