title: android:gravity="center" problem, preview different from emulator
body: <p>Currently, I have this code for this page.</p>
  
  <p>But my preview should that my button is at the center of the second half layout, but in my emulator, it shows it still at the top of the layout.</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;LinearLayout
          xmlns:android="http://schemas.android.com/apk/res/android"
          xmlns:app="http://schemas.android.com/apk/res-auto"
          android:orientation="vertical"
          android:layout_width="match_parent"
          android:layout_height="match_parent"&gt;
  
      &lt;RelativeLayout
              android:layout_weight="1"
              android:layout_width="match_parent"
              android:layout_height="match_parent"
              android:background="@drawable/background_profile"&gt;
  
          &lt;de.hdodenhof.circleimageview.CircleImageView
                  android:id="@+id/profile_img"
                  android:layout_width="100dp"
                  android:layout_height="100dp"
                  android:src="@drawable/default_person_icon"
                  app:civ_border_color="@android:color/black"
                  app:civ_border_width="2dp"
                  android:layout_centerInParent="true"
                  android:layout_marginTop="100dp"/&gt;
          &lt;TextView
                  android:layout_width="wrap_content"
                  android:layout_height="wrap_content"
                  android:text="User Email"
                  android:textSize="28sp"
                  android:textColor="@android:color/white"
                  android:layout_below="@+id/profile_img"
                  android:layout_centerHorizontal="true"
                  android:layout_marginTop="10dp"/&gt;
      &lt;/RelativeLayout&gt;
      &lt;LinearLayout
              android:layout_weight="1"
              android:layout_width="match_parent"
              android:layout_height="match_parent"
              android:orientation="vertical"
              android:gravity="center"&gt;
  
          &lt;Button
                  android:id="@+id/btn_change_password"
                  android:layout_width="match_parent"
                  android:layout_height="wrap_content"
                  android:text="Change Password"
                  app:cornerRadius="50dp"
                  android:layout_marginStart="40dp"
                  android:layout_marginEnd="40dp"/&gt;
  
          &lt;Button
                  android:id="@+id/btn_sign_out"
                  android:layout_width="match_parent"
                  android:layout_height="wrap_content"
                  android:text="Sign Out"
                  app:cornerRadius="50dp"
                  android:layout_marginStart="40dp"
                  android:layout_marginEnd="40dp"/&gt;
  
      &lt;/LinearLayout&gt;
  
  &lt;/LinearLayout&gt;
  </code></pre>
  
  <p>Here the image for preview</p>
  
  <p><a href="https://i.stack.imgur.com/QLaot.jpg" rel="nofollow noreferrer">https://i.stack.imgur.com/QLaot.jpg</a></p>
  
  <p>and here is the image for the emulator</p>
  
  <p><a href="https://i.stack.imgur.com/ED3FP.jpg" rel="nofollow noreferrer">https://i.stack.imgur.com/ED3FP.jpg</a></p>