In this method:
private void implementVisibility(EditText A, EditText B, ImageButton C, boolean visible) {
if (visible) {
A.setVisibility(View.VISIBLE);
B.setVisibility(View.VISIBLE);
C.setVisibility(View.VISIBLE);
}
else if (!visible) { // warning here
}
}
At the else if (!visible)
line I get the warnings:
Condition !visible is always true
Value visible is always false
But looking at the calling method:
if (count2.getVisibility() == View.INVISIBLE) {
implementVisibility(count2, action2, remove2,true);
}
visible
is true
, therefore it isn't always false. Why doesn't the compiler notice this?