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

前端 未结 7 1441
深忆病人
深忆病人 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:47

    hey i stuck with this error for days so there is the simple answer

    you've already created in your class the slidingdrawer whatever; just implement in your class , OnDrawerOpenListener,onDrawerCloseListener

    then let the class add the unimplemented methods and go to the ondraweropenlistener{ slidingdrawer.setclickable(true); }

    and in the drawercloselistener{ slidingdrawer.setclickable(false); }

    this will set when the drawer is opened will make it clickable and prevent clicking in the behind view and when it closes every thing get back to default

    this is the simplest solution try it :D

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