I tried to dynamically change the width of a spinner with the code below, but I get an error message. What is the correct way to do this?
Spinner s1 = (Spinner) findViewById(R.id.s1_10);
s1.setLayoutParams(new LayoutParams(400, LayoutParams.WRAP_CONTENT));