Whenever I try setting the height of a LinearLayout, I always get this exception:
java.lang.ClassCastException: android.widget.LinearLayout$LayoutParams cannot be cast to android.widget.RelativeLayout$LayoutParams
Here is my 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);
Is there a specific import statement I need for this to execute properly?