Android SlidingDrawer doesn't disable buttons 'under' the drawer

前端 未结 7 1442
深忆病人
深忆病人 2021-01-01 14:15

This is the scenario: I have a button B, and a slidingdrawer that when pulled out covers the entire screen. When I pull out the screen, and touch the screen where B used to

7条回答
  •  野趣味
    野趣味 (楼主)
    2021-01-01 14:45

    Just adding to @f-horn 's answer:

    If you include a layout from a different file (like I do) for the SlidingDrawer, you have to put the 'android:clickable="true"' in the included layout file, not in the include tag. Let me rather use an example:

    This will not work:

    main.xml

    
    
            
            
    '
    

    This will:

    main.xml

    
    
            
            
    '
    

    some_other_layout.xml:

    
     ............
    
    

提交回复
热议问题