programmatically change layout height, ClassCastException?
The layout paramaters should be of the type of the parent of your view. For instance, if your WebView is inside a LinearLayout, use LinearLayout.LayoutParams.
use it-
ViewGroup.LayoutParams vc=webview.getLayoutParams();
vc.height=700;
vc.width=450;
webview.setLayoutParams(vc);
It will work