How to disable behind view click event Framelayout

前端 未结 9 1340
遥遥无期
遥遥无期 2020-12-04 20:53

Here i have one view pager activity which has one imageview and 2 overlay bars. there overlay bars i made using android xml file layout itself.

Here my requirement i

9条回答
  •  被撕碎了的回忆
    2020-12-04 21:09

    A better way is to set the top and bottom frame to be clickable, with:

    android:clickable="true"
    

    Doing so will make sure that the view/frame itself will trap all clicking events, and will not pass it through the view behind it. Note this method works for all layout/view/controls, but many controls (such as buttons) already have this function on by default.

提交回复
热议问题