Having two single-selection groups in ActionBar doesn't work, but attaching a pop up menu instead doesn't work either

后端 未结 1 1446
失恋的感觉
失恋的感觉 2020-12-18 07:04

I am writing an Android app where the user must choose how and what to display on a graph. These options are expressed in two single-selection menu groups (radio but

1条回答
  •  余生分开走
    2020-12-18 07:27

    I found an elegant way to solve this that was unfortunately not in the documentation. Add the following code to your ActionBar menu XML:

    
        
            
                
                
            
         
    
    

    No extra handler code or popup menu implementation is necessary for such a menu to appear.

    0 讨论(0)
提交回复
热议问题