title: Adjusting height of linear layout programmatically
body: <p>Whenever I try setting the height of a LinearLayout, I always get this exception:</p>
  
  <pre><code>java.lang.ClassCastException: android.widget.LinearLayout$LayoutParams cannot be cast to android.widget.RelativeLayout$LayoutParams
  </code></pre>
  
  <p>Here is my code:</p>
  
  <pre><code>LinearLayout.LayoutParams  hide = new LinearLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, 0);
  LinearLayout.LayoutParams  show = new LinearLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, 100);
  
  driverMainOptions.setLayoutParams(hide);
  mapDirections.setLayoutParams(show);
  </code></pre>
  
  <p>Is there a specific import statement I need for this to execute properly?</p>