title: Add animation when hide "LinearLayout" (View.GONE) and show LinearLayout (View.VISIBLE)
body: <p>Sorry for my English... I will try to explain what I want to do. 
  I have a project. It can be downloaded at the link:</p>
  
  <ul>
  <li><a href="https://drive.google.com/file/d/0Bxhi0uFKK3upcXJjNGtMVkg4TDQ/view?usp=sharing" rel="nofollow">https://drive.google.com/file/d/0Bxhi0uFKK3upcXJjNGtMVkg4TDQ/view?usp=sharing</a></li>
  </ul>
  
  <p>As you can see the screenshot:</p>
  
  <ul>
  <li><a href="http://pixs.ru/showimage/Screenshot_9509352_15647059.png" rel="nofollow">http://pixs.ru/showimage/Screenshot_9509352_15647059.png</a></li>
  </ul>
  
  <p>The button "Hide/Show B layout" hides and shows the green container - "B layout". I want add animation top down when the container "B layout" is showing. And the animation from the bottom up when the container is hidden.  Also, I want the blue container "C", gradually fell together with the container "B". And rising smoothly, together with the container "B". Please help me to do it.</p>
  
  <p>Below duplicate my code:</p>
  
  <p><strong>MainActivity</strong></p>
  
  <pre><code>public class MainActivity extends Activity {
  View Layout;
  
  @Override
  protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.activity_main);
  
      Layout = findViewById(R.id.bLayout);
  
      final  View  button2  =  findViewById (R.id.button); 
      button2.setOnClickListener(new  View.OnClickListener(){
  
        @Override 
        public void onClick (View v){ 
  
            if ((Layout.getVisibility() == View.VISIBLE))
            {  
  
                Layout.setVisibility(View.GONE);
            }
            else
            {
  
              // Animation animFadeIn = AnimationUtils.loadAnimation(getApplicationContext(), android.R.anim.slide_in_left);
              // Layout.setAnimation(animFadeIn);
               Layout.setVisibility(View.VISIBLE);
  
            }
        } 
      });
  
  }
  </code></pre>
  
  <p>}</p>