title: AndroidX Toolbar is mis-located
body: <p>I am using <code>AndroidX</code> dependencies for my Android project.</p>
  
  <p>I have a <code>Toolbar</code> in my activity (this activity is for supporting the developer by paying him some money) wrapped inside a linear layout like this:</p>
  
  <pre><code>&lt;LinearLayout
  xmlns:android="http://schemas.android.com/apk/res/android"
  xmlns:app="http://schemas.android.com/apk/res-auto"
  xmlns:tools="http://schemas.android.com/tools"
  android:layout_width="match_parent"
  android:layout_height="match_parent"
  android:orientation="vertical"
  android:background="@drawable/gradient"
  tools:context=".Support"&gt;
  
  &lt;androidx.appcompat.widget.Toolbar
      android:id="@+id/toolbar_support"
      android:layout_width="match_parent"
      android:layout_height="?attr/actionBarSize"
      android:background="@null"
      app:popupTheme="@style/AppTheme.PopupOverlay" /&gt;
  
  &lt;/LinearLayout&gt;
  </code></pre>
  
  <p>The other XML codes used are as follows:</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"
  xmlns:tools="http://schemas.android.com/tools"
  android:layout_width="match_parent"
  android:layout_height="match_parent"
  android:orientation="vertical"
  android:background="@drawable/gradient"
  tools:context=".Support"&gt;
  
  &lt;androidx.appcompat.widget.Toolbar
      android:id="@+id/toolbar_support"
      android:layout_width="match_parent"
      android:layout_height="?attr/actionBarSize"
      android:background="@null"
      app:popupTheme="@style/AppTheme.PopupOverlay" /&gt;
  
  &lt;TextView
      android:layout_marginTop="150dp"
      android:layout_marginStart="10dp"
      android:layout_marginEnd="10dp"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:fontFamily="@font/google_sans"
      android:textSize="17dp"
      android:textColor="#ffffff"
      android:text="@string/support_para"/&gt;
  
  &lt;LinearLayout
      android:layout_width="match_parent"
      android:layout_height="wrap_content"
      android:gravity="center"
      android:orientation="horizontal"&gt;
  
      &lt;TextView
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:layout_gravity="center"
          android:textColor="#ffffff"
          android:textSize="20dp"
          android:text="$"/&gt;
  
      &lt;EditText
          android:id="@+id/amount"
          android:layout_width="270dp"
          android:layout_height="wrap_content"
          android:layout_marginTop="10dp"
          android:hint="@string/pay_amount"
          android:textColorHint="#ffffff"
          android:textSize="20dp"
          android:layout_marginStart="10dp"
          android:layout_gravity="end"
          android:maxLines="1" /&gt;
  &lt;/LinearLayout&gt;
  
  &lt;Button
      android:id="@+id/googlepay"
      android:layout_width="300dp"
      android:layout_height="wrap_content"
      android:layout_gravity="center"
      android:layout_marginTop="30dp"
      android:background="@drawable/round_button"
      android:textColor="#ffffff"
      android:fontFamily="@font/google_sans"
      android:text="@string/pay"/&gt;
  
  &lt;/LinearLayout&gt;
  </code></pre>
  
  <p>Now what I get is this:</p>
  
  <p><a href="https://i.stack.imgur.com/HUunm.png" rel="noreferrer"><img src="https://i.stack.imgur.com/HUunm.png" alt="Activity image"></a></p>