I have this code in my application:
LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(WRAP_CONTENT, WRAP_CONTENT);
and I
You can't change LinearLayout's orientation using its LayoutParams. It can be done only with a LinearLayout object.
LinearLayout
LayoutParams
LinearLayout layout = /* ... */; layout.setOrientation(LinearLayout.VERTICAL);