title: programmatically change layout height, ClassCastException?
body: <p>I'm trying to "animate" a WebView to drop down and reveal its contents. I've written a handler to increase the height by 1 each time, however, I'm running into a ClassCastException. The code I'm 
  using is:</p>
  
  <pre><code>WebView.LayoutParams params = new WebView.LayoutParams(wv.getLayoutParams());
  params.height = height;
  wv.setLayoutParams(params);
  height++;
  this.sleep(20);
  </code></pre>
  
  <p>On the line wv.setLayoutParams(params), I get a:</p>
  
  <blockquote>
    <p>java.lang.ClassCastException: android.widget.AbsoluteLayout$LayoutParams</p>
  </blockquote>
  
  <p>How do I fix this?</p>