Adding a fragment on top of another fragment onClickListener issue

后端 未结 3 1077
爱一瞬间的悲伤
爱一瞬间的悲伤 2021-02-07 02:53

I\'m adding a fragment to an activity instead of replacing the current fragment (because this corresponds to the type of behavior I want to hav

3条回答
  •  面向向阳花
    2021-02-07 03:42

    You can just add the following attribute to the XML root layout of the fragment that agoes on top-

    android:clickable="true"
    

    This will ensure that touch events will not propagate further than the top layer.

提交回复
热议问题