关于actionBar 返回按钮

来源:互联网 发布:ubuntu 添加软件库 编辑:程序博客网 时间:2024/06/07 15:04
在 onCreate 中添加下面

        ActionBar actionBar = getActionBar();
        if (actionBar != null) {
            // android.R.id.home will be triggered in onOptionsItemSelected()
            actionBar.setDisplayHomeAsUpEnabled(true);
        }

0 0