📜  sethomebutton 监听器 android - Java 代码示例

📅  最后修改于: 2022-03-11 14:52:05.365000             🧑  作者: Mango

代码示例1
@Override
public boolean onOptionsItemSelected(MenuItem item) {
    int id = item.getItemId();

    if (id == android.R.id.home) {
        onBackPressed();  return true;
    }

    return super.onOptionsItemSelected(item);
}