title: Programmatically adding three buttons in line in a LinearLayout
body: <p>I'm creating a LinearLayout programmatically and I'm adding to this layout three buttons, but they're showed one on top of the other.</p>
  
  <p>How I can show the buttons in line?</p>
  
  <p>Reading around I probably understood that I need to set up a LayoutParams but I didn't figured out how..</p>
  
  <p>I've tried with this but it didn't did the trick..</p>
  
  <pre><code>LinearLayout.LayoutParams layoutParams = new LinearLayout.LayoutParams(
              ViewGroup.LayoutParams.MATCH_PARENT,
              ViewGroup.LayoutParams.MATCH_PARENT
  );
  ll.addView(b1, layoutParams);
  ll.addView(b2, layoutParams);
  ll.addView(b3, layoutParams);
  </code></pre>
  
  <p>Thanks for any help!</p>
  
  <p><strong>EDIT:</strong></p>
  
  <p>Probably I needed to add more details.</p>
  
  <p>I have also other stuff in the Layout but I does'n matter, I've created an additional layout just for the buttons.</p>
  
  <p>Now the buttons are in line but they have different width.. : /</p>
  
  <p>I've tried with this but it didn't help..</p>
  
  <pre><code>LinearLayout.LayoutParams layoutParams = new LinearLayout.LayoutParams(
              ViewGroup.LayoutParams.MATCH_PARENT,
              ViewGroup.LayoutParams.WRAP_CONTENT,
              1f
  );
  </code></pre>