title: How to implement autocomplete google place api in toolbar - Android
body: <p>I am implementing a restaurant based application in which I am typing place name in toolbar
  I am not able to implement autocomplete feature in App toolbar.....  <em>Please help</em></p>
  <p><strong>menu xml code</strong></p>
  <pre><code>&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
  &lt;menu xmlns:app=&quot;http://schemas.android.com/apk/res-auto&quot;
      xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot;&gt;
      &lt;item android:id=&quot;@+id/my_search&quot;
          app:showAsAction=&quot;ifRoom&quot;
          android:icon=&quot;@drawable/ic_baseline_search_24&quot;
          android:title=&quot;My Location&quot; /&gt;
      &lt;item android:id=&quot;@+id/my_location&quot;
          app:showAsAction=&quot;ifRoom&quot;
          android:icon=&quot;@drawable/ic_baseline_gps_fixed_24&quot;
          android:title=&quot;My Location&quot; /&gt;
  &lt;/menu&gt;
  </code></pre>
  <p><strong>java code</strong></p>
  <pre><code>@Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_main);
          Toolbar toolbar = (Toolbar) findViewById(R.id.toolbarLayout);
          setSupportActionBar(toolbar);
  
         
  
     }
  @Override
      public boolean onCreateOptionsMenu(Menu menu) {
          MenuInflater inflater = getMenuInflater();
          inflater.inflate(R.menu.menu_main, menu);
          MenuItem item = menu.findItem(R.id.my_search);
          SearchView searchView = (SearchView) item.getActionView();
          searchView.setOnQueryTextListener(new SearchView.OnQueryTextListener() {
              @Override
              public boolean onQueryTextSubmit(String query) {
                  return false;
              }
  
              @Override
              public boolean onQueryTextChange(String newText) {
                  return false;
              }
          });
          return true;
      }
  </code></pre>