title: Implement a search bar like Google Maps' in an Android application
body: <p>I'm building an app that makes use of Google Maps API, and I want it to have a floating search bar at the top, exactly like the one present in Google Maps app.</p>
  
  <p>I've found out about Places Autocomplete, but the application will not search for places but another kind of data that the users will have created.</p>
  
  <p>I've also found out about a library named Float Search View, but it's been discontinued for some time already, therefore I'd like to pass on this. I'd also like to create it manually because this is the first Android app I'll be building, I want to learn.</p>
  
  <p>I have tried implementing a <code>SearchView</code> in my XML:</p>
  
  <pre><code>&lt;android.support.v7.widget.SearchView
      android:id="@+id/searchView"
      android:layout_width="match_parent"
      android:layout_height="wrap_content"
      app:iconifiedByDefault="false"
      app:queryHint="@string/search_hint"
      android:theme="@style/SearchBar"/&gt;
  </code></pre>
  
  <p>With a white background and elevation:</p>
  
  <pre><code>&lt;style name="SearchBar"&gt;
      &lt;item name="android:background"&gt;@color/colorPrimary&lt;/item&gt;
      &lt;item name="android:elevation"&gt;4dp&lt;/item&gt;
  &lt;/style&gt;
  </code></pre>
  
  <p>To see if I could get close to it, but the result very weird.</p>
  
  <p><a href="https://i.stack.imgur.com/FxjQr.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/FxjQr.png" alt="enter image description here"></a></p>
  
  <p>I'd tried other ways like adding a <code>Toolbar</code>, but the result was the same.</p>
  
  <p>I want a result just like Google Maps' search bar at the top. How do I do it?</p>