title: setVisibility to View using Integer
body: <p>I'm trying to set visibility in Android to many views at once and I want to send Integer to this views instead copying and pasting my code. </p>
  
  <pre><code>        if (gameIsActive == false) {
  
          startButton.setVisibility(startButton.VISIBLE);
          greetingTextView.setVisibility(greetingTextView.VISIBLE);
  
          gridLayout.setVisibility(View.INVISIBLE);
          timerTextView.setVisibility(View.INVISIBLE);
          scoreTextView.setVisibility(View.INVISIBLE);
          checkerTextView.setVisibility(View.INVISIBLE);
  
      } else {
  
          startButton.setVisibility(startButton.INVISIBLE);
          greetingTextView.setVisibility(greetingTextView.INVISIBLE);
  
          gridLayout.setVisibility(View.VISIBLE);
          timerTextView.setVisibility(View.VISIBLE);
          scoreTextView.setVisibility(View.VISIBLE);
          checkerTextView.setVisibility(View.VISIBLE);
  
  }
  </code></pre>
  
  <p>I know that <code>INVISIBLE = 4</code> and <code>VISIBLE = 0</code>, but creating <code>int</code> doesn't help.</p>
  
  <pre><code>int isVisible = 0;
  startButton.setVisibility(startButton.isVisible);
  </code></pre>
  
  <p>How can I switch visible to invisible?</p>