Home > Software engineering >  make buttons behind view not clickable
make buttons behind view not clickable

Time:09-21

I have a linear view in front of some buttons with a background and my problem is that I can still click the buttons on the back of the view even though I can't see them. is there a way I can make the view "solid" so I won't be able to click through its background/borders?

CodePudding user response:

I am not sure why you are not just deleting the buttons but one way you can go about it is disenabling the buttons from your java file using

myButton.setEnabled(false);

or in your xml file using:

    <Button
android:enabled="false"
/>

CodePudding user response:

Solved! I just made the view clickable thus making it "solid" and stopping anyone from clicking stuff behind it

  • Related