title: Problems with Views and animations
body: <p>I have Linear Layouts that i want to replace each other on click.
  At start: Linear Layout A is visible, Linear Layout B is gone
  I want when A is clicked to be gone and B to be visible and vice versa.
  without the animation it all worked just fine, but when i set animation after clicking B B is gone, but A is not visible although if i click in its place the Log gives me that it's visible
  here's the code, any help would be appreciated</p>
  
  <pre><code>private void switchRowItems(final LinearLayout toBeHiddenRow,final LinearLayout toBeShownRow){
      toBeHiddenRow.animate()
              .rotation(toBeHiddenRow.getHeight()/2)
              .alpha(0.0f)
              .setDuration(300)
              .setListener(new AnimatorListenerAdapter() {
                  @Override
                  public void onAnimationEnd(Animator animation) {
                      super.onAnimationEnd(animation);
                      toBeHiddenRow.clearAnimation();
                      toBeHiddenRow.setVisibility(View.GONE);
                      toBeShownRow.clearAnimation();
                      toBeShownRow.setVisibility(View.VISIBLE);
                  }
              });
      //toBeShownRow.clearAnimation();
     // toBeShownRow.setVisibility(View.VISIBLE);
  
  }
  </code></pre>
  
  <p>and the on click checker is as simple as:</p>
  
  <pre><code> if (llRowTwoItemOne.getVisibility() == View.VISIBLE) {
          Log.d("llRowTwoItemOne","visible");
      } else {
          Log.d("llRowTwoItemOne","not visible");
      }
  </code></pre>