Answer the question
In order to leave comments, you need to log in
How to correctly specify the condition for the "if" operator?
if (button1.VISIBLE && button2.VISIBLE) toast.makeText(...);
Answer the question
In order to leave comments, you need to log in
It's simple, you are comparing two constants. Not only are they int, they are also constant. Such a condition will not give you anything. You need to check instead. View#getVisibility()
UPD: Final version:
if (button1.getVisibility() == View.VISIBLE && button2.getVisibility() == View.VISIBLE) {}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question