title: How to align a button in a LinearLayout in Android app?
body: <p>I am a beginner and trying to create a calculator.</p>
  
  <p>I am unable to align 3 button in single <code>LinearLayout</code> .</p>
  
  <p>My code for the calculator.xml for the LinearLayout is.</p>
  
  <p></p>
  
  <pre><code>    &lt;Button
          android:id="@+id/btnOne"
          android:layout_height="wrap_content"
          android:layout_weight="0.32"
          android:layout_width="107dp"
          android:background="@android:color/darker_gray"
          android:text="1" /&gt;
  
      &lt;Button
          android:id="@+id/btnPlus"
          android:layout_height="wrap_content"
          android:layout_weight="0.24"
          android:layout_width="107dp"
          android:text="+" /&gt;
  
      &lt;Button
          android:id="@+id/btnEquals"
          android:layout_width="107dp"
          android:layout_height="wrap_content"
          android:layout_weight="0.31"
          android:text="=" /&gt;
  &lt;/LinearLayout&gt;
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/scMNr.png" alt="enter image description here"></p>
  
  <p>How i can bring the 3 buttons in a single row?</p>