Switch in Navigation drawer item with Design Support Library on Android

前端 未结 8 1970
长情又很酷
长情又很酷 2020-12-30 07:05

I need to put Switch inside item in navigation drawer. I\'m using new design support library, but I cannot find if it is posibble at all. When using

android         


        
8条回答
  •  南笙
    南笙 (楼主)
    2020-12-30 07:40

    Your menu item for the navigation drawer:

    
    

    and the layout for that item:

    
    
    
        
    
    
    

    EDIT:

    I ended up using a different approach. In fact, I found out that you can use any view in the drawer, so there's no point in bothering with the menu stuff. Just create a view the usual way (with listeners, etc.) and add in to the drawer.

提交回复
热议问题