Android监听HOME键的最简单的方法
public static final int FLAG_HOMEKEY_DISPATCHED = 0x80000000; public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); this.getWindow().setFlags(FLAG_HOMEKEY_DISPATCHED, FLAG_HOMEKEY_DISPATCHED);//关键代码 setContentView(R.layout.main); } 再重写onKey事件就可以。