title: Android weightsum not working as expected
body: <p>I have one horizontal Linear Layout with Width = match_parent and weightsum=5.
  If i insert 5 vertical Linear Layouts with each width=0 and weight=1 everything looks as expected, the layouts each get the same width.
  If i add only 2 vertical with each width=0 and weight=1 they take more space than they should. I expected them to also take 1/5 of the space.</p>
  
  <p>Maybe it is the correct behaviour that they take more space and I understood the concept of weight/weightsum wrong.</p>
  
  <p>Thanks for any help!</p>
  
  <p>edit:
  I try to add some Code</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>LinearLayout linear=null;
              LinearLayout.LayoutParams layoutParams= new 
                LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT, 
                LinearLayout.LayoutParams.WRAP_CONTENT);
  
  linear=new LinearLayout(getApplicationContext());
                linear.setOrientation(LinearLayout.HORIZONTAL);
                linear.setLayoutParams(layoutParams);
                linear.setPadding(15, 0, 15, 10);
                linear.setWeightSum(Float.valueOf(modulo));
  //modulo 5 in my example
  
  
  LinearLayout linear2=new LinearLayout(getApplicationContext());
  LinearLayout.LayoutParams lp1 = new LinearLayout.LayoutParams(0, 
                    LinearLayout.LayoutParams.WRAP_CONTENT, 1f);
  if(count%modulo!=modulo-1){
          lp1.setMargins(0, 0, 15, 0);
  } else {
          lp1.setMargins(0, 0, 0, 0);
         }
  linear2.setLayoutParams(lp1);
  linear2.setOrientation(LinearLayout.VERTICAL);</code></pre>
  </div>
  </div>
  </p>
  
  <p>I add the layout linear 2 into linear in a loop
  Why can you click run code :D</p>