title: Set LinearLayout weight in code rather than xml problem
body: <p>I have the following code to try and set the weight of a linearLayout to 0.7, after looking at the documentation and some examples online it says it takes 3 parameters but in my code it will not let me:</p>
  
  <pre><code>LinearLayout linear = new LinearLayout(this); 
  linear.setLayoutParams(new LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.WRAP_CONTENT));
  </code></pre>
  
  <p>So here it sets both the height and the width but the last parameter it says in the documentation is the weight and it wont let me put it in there.</p>