我试图在操作栏中显示自定义视图.我正在使用SherlockActionBar.这是我的代码.自定义视图永远不会显示.我究竟做错了什么?
View customNav = LayoutInflater.from(this).inflate(R.layout.my_layout, null);
getSupportActionBar().setDisplayShowTitleEnabled(false);
getSupportActionBar().setCustomView(customNav);
Run Code Online (Sandbox Code Playgroud)