title: How do I save the instance state of a LinearLayout in Android?
body: <p>in my app I dynamically set the visibility of a linearlayout. The problem is that on rotation of the device, the state of the linear layout (visible or not) is not saved.</p>
  
  <p>Now I would like to save the state with the help of saving the instance state of the layout.
  Can someone help me with the according methods? What values do I have to provide?</p>
  
  <pre><code>@Override
  protected void onSaveInstanceState(Bundle outState) {
      super.onSaveInstanceState(outState);
      // ??
  }
  
  @Override
  protected void onRestoreInstanceState(Bundle savedInstanceState) {
      super.onRestoreInstanceState(savedInstanceState);
      // ???
  }
  </code></pre>