title: androidx.appcompat.widget.Toolbar doesn't show up
body: <p>In my Android application, there is a single main Activity with two Fragments. in one of them, I want to create the InstantSearch.</p>
  
  <p>I'm trying to follow the <a href="https://www.algolia.com/doc/guides/building-search-ui/getting-started/android/" rel="nofollow noreferrer">InstantSearch guide</a> but the <code>androidx.appcompat.widget.Toolbar</code> doesn't appear at all.</p>
  
  <p>Here is my layout file for this Fragment:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;androidx.constraintlayout.widget.ConstraintLayout
      xmlns:android="http://schemas.android.com/apk/res/android"
      xmlns:app="http://schemas.android.com/apk/res-auto"
      android:layout_width="match_parent"
      android:layout_height="match_parent"&gt;
  
      &lt;androidx.appcompat.widget.Toolbar
          android:id="@+id/toolbar"
          app:layout_constraintTop_toTopOf="parent"
          android:layout_width="0dp"
          app:layout_constraintEnd_toEndOf="parent"
          app:layout_constraintStart_toStartOf="parent"
          android:layout_height="?attr/actionBarSize"&gt;
  
          &lt;androidx.constraintlayout.widget.ConstraintLayout
              xmlns:tools="http://schemas.android.com/tools"
              android:layout_width="match_parent"
              android:layout_height="match_parent"
              android:clipChildren="false"
              android:clipToPadding="false"&gt;
  
              &lt;androidx.appcompat.widget.SearchView
                  android:id="@+id/searchView"
                  android:layout_width="0dp"
                  android:layout_height="0dp"
                  android:focusable="false"
                  app:layout_constraintBottom_toBottomOf="parent"
                  app:layout_constraintStart_toStartOf="parent"
                  app:layout_constraintTop_toTopOf="parent"
                  app:iconifiedByDefault="false" /&gt;
  
          &lt;/androidx.constraintlayout.widget.ConstraintLayout&gt;
  
      &lt;/androidx.appcompat.widget.Toolbar&gt;
  
      &lt;TextView
          android:id="@+id/stats"
          android:textAppearance="@style/TextAppearance.MaterialComponents.Caption"
          app:layout_constraintTop_toBottomOf="@+id/toolbar"
          app:layout_constraintStart_toStartOf="parent"
          app:layout_constraintEnd_toEndOf="parent"
          android:padding="16dp"
          android:layout_width="0dp"
          android:layout_height="wrap_content"/&gt;
  
      &lt;androidx.recyclerview.widget.RecyclerView
          android:id="@+id/memory_recyclerview"
          android:layout_width="match_parent"
          android:layout_height="match_parent"
          android:layout_below="@+id/toolbar"&gt;
  
      &lt;/androidx.recyclerview.widget.RecyclerView&gt;
  
      &lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
          xmlns:tools="http://schemas.android.com/tools"
          android:layout_width="match_parent"
          android:layout_height="match_parent"
          android:layout_below="@+id/toolbar"
          xmlns:fab="http://schemas.android.com/apk/res-auto"
          tools:context="com.memoryDiary.Fragment.MemoryFragment"
          android:padding="8dp"&gt;
  
          &lt;com.github.clans.fab.FloatingActionMenu
              android:id="@+id/add_memory_fab_menu"
              android:layout_width="297dp"
              android:layout_height="wrap_content"
              android:layout_alignParentRight="true"
              android:layout_alignParentBottom="true"
              android:layout_marginLeft="10dp"
              android:layout_marginRight="10dp"
              android:layout_marginBottom="10dp"
              android:clickable="true"
  
              fab:menu_animationDelayPerItem="50"
              fab:menu_backgroundColor="@android:color/transparent"
              fab:menu_buttonSpacing="0dp"
              fab:menu_colorNormal="@color/babyBlue"
              fab:menu_colorPressed="@color/red"
              fab:menu_colorRipple="#99FFFFFF"
              fab:menu_fab_hide_animation="@anim/fab_slide_out_to_right"
              fab:menu_fab_show_animation="@anim/fab_slide_in_from_right"
              fab:menu_fab_size="normal"
              fab:menu_icon="@drawable/ic_add_white_24dp"
              fab:menu_labels_colorNormal="#333333"
              fab:menu_labels_colorPressed="#444444"
              fab:menu_labels_colorRipple="#66FFFFFF"
              fab:menu_labels_cornerRadius="3dp"
              fab:menu_labels_ellipsize="none"
              fab:menu_labels_hideAnimation="@anim/fab_slide_out_to_right"
              fab:menu_labels_margin="0dp"
              fab:menu_labels_maxLines="-1"
              fab:menu_labels_padding="8dp"
              fab:menu_labels_paddingBottom="4dp"
              fab:menu_labels_paddingLeft="8dp"
              fab:menu_labels_paddingRight="8dp"
              fab:menu_labels_paddingTop="4dp"
              fab:menu_labels_position="left"
              fab:menu_labels_showAnimation="@anim/fab_slide_in_from_right"
              fab:menu_labels_showShadow="true"
              fab:menu_labels_singleLine="false"
              fab:menu_labels_textColor="#FFFFFF"
              fab:menu_labels_textSize="14sp"
              fab:menu_openDirection="up"
              fab:menu_shadowColor="#66000000"
              fab:menu_shadowRadius="4dp"
              fab:menu_shadowXOffset="1dp"
              fab:menu_shadowYOffset="3dp"&gt;
  
              &lt;com.github.clans.fab.FloatingActionButton
                  android:id="@+id/add_memory_fab_add"
                  android:layout_width="wrap_content"
                  android:layout_height="wrap_content"
                  android:src="@drawable/ic_insert_comment_white_24dp"
                  fab:fab_label="Create Memory"
                  fab:fab_size="mini" /&gt;
  
              &lt;com.github.clans.fab.FloatingActionButton
                  android:id="@+id/add_memory_fab_search"
                  android:layout_width="wrap_content"
                  android:layout_height="wrap_content"
                  android:src="@drawable/ic_search_white_24dp"
                  fab:fab_label="Search"
                  fab:fab_size="mini" /&gt;
  
              &lt;com.github.clans.fab.FloatingActionButton
                  android:id="@+id/add_memory_fab_logout"
                  android:layout_width="wrap_content"
                  android:layout_height="wrap_content"
                  android:src="@drawable/ic_logout_new_white_24dp"
                  fab:fab_label="Logout"
                  fab:fab_size="mini" /&gt;
          &lt;/com.github.clans.fab.FloatingActionMenu&gt;
  
  
      &lt;/RelativeLayout&gt;
  &lt;/androidx.constraintlayout.widget.ConstraintLayout&gt;
  </code></pre>
  
  <p>My app build.gradle file includes <code>implementation 'androidx.appcompat:appcompat:1.0.0'</code> dependency.</p>
  
  <p>In addition, I changed the style.xml file to have <code>Theme.AppCompat.Light.NoActionBar</code> instead of <code>Theme.AppCompat.Light.DarkActionBar</code>.</p>
  
  <p>What could be the reason for toolbar doesn't show up?</p>
  
  <p>Thanks for helping.</p>
  
  <p>EDIT: As @Mayur Patel say, I had the wrong constraint to my RelativeLayout and now the problem is that <code>androidx.appcompat.widget.SearchView</code> doesn't appear.</p>