title: Android: hide an element
body: <p>imagine an Android app that has 3 TextViews in a linear layout, one sequentially below the other, then 2 buttons. 1 button needs to hide the second text view, and the second button needs to make it visible again.</p>
  
  <p>The only <strong>requirement is that when the second text view goes away, it should not occupy any space</strong>, meaning that third text view should occupy its space while it is gone.</p>
  
  <p>I tried this with the INVISIBLE and VISIBLE settings, however, a blank placeholder remains in the place of the second text view.</p>
  
  <p>I tried with GONE, which eliminated the blank space, however I could not make the second text view appear again.</p>
  
  <p>Do you know a way to achieve this?</p>
  
  <p>Example: </p>
  
  <pre><code>////////////////////////////
  initial state:
  textview1
  textview2
  textview3
  button1
  button2
  
  --&gt; user pushes button1
  
  new state:
  textview1
  textview3
  button1
  button2
  
  --&gt; user pushes button2
  
  new state: initial state
  ////////////////////////////
  </code></pre>
  
  <p>Thanks</p>