Android create custom overflow menu item

后端 未结 8 1170
小鲜肉
小鲜肉 2020-12-16 16:54

I want to create a custom overflow menu item in my ActionBar in addition at the Setting item like described in the image below:

8条回答
  •  悲&欢浪女
    2020-12-16 17:42

    when click item from actionbar

    PopupMenu popup = new PopupMenu(MainActivity.this, v);
    popup.getMenuInflater().inflate(
                                R.mymenu xml , popup.getMenu());
    
    
    
    mymenu.xml
    
    
    
    
    
    
           
              
              
          
    
    
    
    

提交回复
热议问题