title: How to add a Search to an action bar?
body: <p>Here is my XML file: </p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;android.support.design.widget.CoordinatorLayout
  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:background="#E0E0E0"
  android:fitsSystemWindows="true"
  tools:context="com.ccb.lldm.lldmhimnario.Cantos"&gt;
  
  &lt;android.support.design.widget.AppBarLayout
      android:layout_width="match_parent"
      android:layout_height="wrap_content"
      android:theme="@style/AppTheme"&gt;
  
      &lt;android.support.v7.widget.Toolbar
          android:id="@+id/toolbar"
          android:elevation="25dp"
          android:layout_width="match_parent"
          android:layout_height="?attr/actionBarSize"
          android:background="?attr/colorPrimaryDark"
          app:popupTheme="@style/AppTheme.PopupOverlay" /&gt;
  
  
  
  &lt;/android.support.design.widget.AppBarLayout&gt;
  
  &lt;include layout="@layout/content_cantos" /&gt;
  
  &lt;/android.support.design.widget.CoordinatorLayout&gt;
  </code></pre>
  
  <p>Here is my Java:</p>
  
  <pre><code>public class Cantos extends AppCompatActivity {
  
  @Override
  protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.activity_cantos);
  
      Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
      setSupportActionBar(toolbar);
      toolbar.setLogo(R.mipmap.ic_launcher);
      toolbar.setTitle("Cantos");
      toolbar.setTitleTextColor(getColor(R.color.colorPrimary));
  
  }
  
  }
  </code></pre>
  
  <p>I was wondering how to add a search to my action bar. So when I input characters, names/objects will come up. Thank you in advance. (Is my XML file correct too?)</p>