Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to disable clicks under android constraintlayout

I have an activity layout which had reyclerview list and on click on filter button another layout opens above it but the problem is when click on white space on the filter layout it make click on the hidden item in the recyclerview which hidden under it so how can I make no action happens on clicking on white space on the filter layout


1 Answers

try to add this atrr to your group layout constraintlayout your top layer parent

android:clickable="true"
android:focusable="true"
android:focusableInTouchMode="true"

this atrr will make your layout(Top) click able and avoid click white space to bottom layout

-- hope this help

like image 162
Mahmoud Abu Alheja Avatar answered Oct 18 '25 07:10

Mahmoud Abu Alheja



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!