title: SearchView not searching
body: <p>I am trying to implement search functionality in my android app using SearchView within the layout of my app. I purposefully chose to have it in the layout rather than in the Action Bar.</p>
  
  <p>The problem is that once I type the search text and hit the enter/search key on the keyboard nothing happens. The searchable intent is never called. I feel like I must be missing something that is causing the search not to trigger</p>
  
  <p>I apologize if I haven't included the code in the correct format below. Please let me know if there is any additional information that would help. Thanks in advance! </p>
  
  <p>Manifest
      
      </p>
  
  <pre><code>&lt;uses-sdk
      android:minSdkVersion="11"
      android:targetSdkVersion="17" /&gt;
  &lt;uses-permission android:name="android.permission.INTERNET"/&gt;
  &lt;uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/&gt;
  
  &lt;application
      android:allowBackup="true"
      android:icon="@drawable/ic_launcher"
      android:label="@string/app_name"
      android:theme="@style/AppTheme" &gt;
      &lt;activity
          android:name="com.lotr.arda.MainActivity"
          android:label="@string/app_name" &gt;
  
      &lt;/activity&gt;
      &lt;activity
          android:name=".WebActivity"
          android:theme="@android:style/Theme.NoTitleBar" &gt;
        &lt;/activity&gt;
           &lt;activity
          android:name=".menuActivity"
          android:theme="@android:style/Theme.NoTitleBar" &gt;
           &lt;intent-filter&gt;
              &lt;action android:name="android.intent.action.MAIN" /&gt;
  
              &lt;category android:name="android.intent.category.LAUNCHER" /&gt;
          &lt;/intent-filter&gt;
        &lt;/activity&gt;
        &lt;activity android:name="com.google.ads.AdActivity" android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize"&gt;
          &lt;/activity&gt;
           &lt;activity android:name=".searchActivity" &gt;
      &lt;intent-filter&gt;
          &lt;action android:name="android.intent.action.SEARCH" /&gt;
      &lt;/intent-filter&gt;
      &lt;meta-data android:name="android.app.searchable"
                 android:resource="@xml/searchable"/&gt;
  &lt;/activity&gt;
  &lt;/application&gt;
  &lt;/manifest&gt;
  </code></pre>
  
  <p>Res/XML/search</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;searchable xmlns:android="http://schemas.android.com/apk/res/android"
  android:label="@string/app_name"
  android:hint="@string/searchhint" &gt;
  &lt;/searchable&gt;
  </code></pre>
  
  <p>SearchActivity.java</p>
  
  <pre><code>package com.lotr.arda;
  
  import android.app.ListActivity;
  import android.app.SearchManager;
  import android.content.Intent;
  import android.os.Bundle;
  
  public class searchActivity extends ListActivity{
  
  @Override
  public void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.search_page);
  
      // Get the intent, verify the action and get the query
      Intent intent = getIntent();
      if (Intent.ACTION_SEARCH.equals(intent.getAction())) {
        String query = intent.getStringExtra(SearchManager.QUERY);
  
        System.out.println(query);
        //doMySearch(query);
      }
  }
  }
  </code></pre>
  
  <p>menuActivity.java (layout where searchview is located)</p>
  
  <pre><code>package com.lotr.arda;
  
  import com.google.ads.AdRequest;
  import com.google.ads.AdView;
  import android.app.Activity;
  import android.app.SearchManager;
  import android.app.SearchableInfo;
  import android.content.Intent;
  import android.os.Bundle;
  import android.view.View;
  import android.widget.Button;
  import android.widget.SearchView;
  
  
  
  public class menuActivity extends Activity {
  
      public void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.menu_page);
      try{    
  
          AdView myad = (AdView) findViewById(R.id.ad);
           AdRequest adRequest = new AdRequest(); 
  
           myad.loadAd(adRequest);
  
           SearchManager searchManager = (SearchManager)getSystemService(SEARCH_SERVICE);
           SearchableInfo searchableInfo = searchManager.getSearchableInfo(getComponentName());
  
           SearchView sv = (SearchView)findViewById(R.id.searchView1);
           sv.setSearchableInfo(searchableInfo);
  
           Button alpha = (Button)this.findViewById(R.id.button1);
           alpha.setOnClickListener(new View.OnClickListener() {
                  public void onClick(View v) {
                         Intent intent = new Intent(menuActivity.this, MainActivity.class);
                          startActivity(intent);                      
                  }});            
      }catch(Exception e) {System.out.println(e.toString());}
      }
  }
  </code></pre>