title: I changed gravity but button position is same
body: <p><img src="https://i.stack.imgur.com/nVO15.png" alt="enter image description here"></p>
  
  <p>Can you explain please why it isn't changing when I change gravity. First when I changed it position of button was changed but now I can't change position.</p>
  
  <p>main.XML</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:orientation="vertical" &gt;
  
  
      &lt;Button
          android:id="@+id/button1"
          android:layout_width="92dp"
          android:layout_height="0dp"
          android:layout_gravity="right"
          android:layout_weight="1"
          android:text="@string/button1" /&gt;
  
  &lt;/LinearLayout&gt;
  </code></pre>