How to set an icon at the end of Toolbar

后端 未结 5 1455
醉酒成梦
醉酒成梦 2021-01-17 08:36

I want to set an icon at the the end of my Toolbar,which start another activity. My Toolbar portion

 

        
5条回答
  •  太阳男子
    2021-01-17 09:10

    
    
    

    Then in OnCreateView: setHasOptionsMenu(true); Closing the OncreateView below write this: @Override

    public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {
        inflater.inflate(R.menu.pdf, menu);
        ...
    }
    

提交回复
热议问题