Skip to content
Advertisement

Not able to dynamically set the setVisibility() parameter

I am trying to set the visibility for a button as follows:

JavaScript

But I am getting the error:

JavaScript

while calling

JavaScript

I don’t know how to get around this. I understand that it’s expecting a given set of values but all I know is to pass an int to it. What can be done here?

Advertisement

Answer

When you know what you’re doing, you can suppress this Android Studio inspection locally with

JavaScript

For example,

JavaScript
User contributions licensed under: CC BY-SA
9 People found this is helpful
Advertisement