How to create a custom PopupMenu in Android

前端 未结 3 1873
花落未央
花落未央 2020-12-14 03:26

How can I replicate something like I made below in Balsamiq?

I made this menu, but it is only displaying the text of the items (not the icons). Is it possible to di

3条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-12-14 04:11

    I resolved this issue by simply putting the create_post_menu inside of the item whose icon is a +.

    For example, I have (using AppCompat):

    
    
        
    
                
    
                    
                    
                    
                    
                    
    
                
            
            ...(more menu items here)
    
    

    Without AppCompat, you could just get rid of the XML Namespace app by replacing app with android.

提交回复
热议问题