title: How to set visibility from onAnimationUpdate
body: <p>I want to make some views in my app visible and some other views invisible when some animated value of those views is more than a specific value (say, 0.5f).</p>
  <p>Something like this:</p>
  <pre><code>@Override
  public void onAnimationUpdate(ValueAnimator animation) {
  
      if((float)animation.getAnimatedValue() &gt;= 0.2){
          (View)animation.setVisibility(View.GONE); //Something like this
          
      }
  }
  </code></pre>
  <p>As you know, <code>setVisibility()</code> function doesn't work!</p>
  <p>How can I achieve this?</p>