title: Searchview in the actionbar not work
body: <p>I try to use the Search-view  in the action-bar, but after I click on the search button at the bottom of the keyboard nothing happen. I post my code below. Please neglate the packages names in the file. In my code I set the value of the searchview to the textView, it is not set. Log cat also not show anything else. Thank you in advance. </p>
  
  <pre><code>    Folder.java ------------------------------------
  
  
  
      @Override
      public boolean onCreateOptionsMenu(Menu menu) {
      // TODO Auto-generated method stub
      MenuInflater menuInflater = getMenuInflater();
      menuInflater.inflate(R.menu.home, menu); 
      //----THIS ONE -----------
      // Associate searchable configuration with the SearchView
      SearchManager searchManager = (SearchManager) getSystemService(Context.SEARCH_SERVICE);
      SearchView searchView = (SearchView) menu.findItem(R.id.action_search)
      .getActionView();
      searchView.setSearchableInfo(searchManager
      .getSearchableInfo(getComponentName()));
  
      //----THIS ONE ---------------------------------------------------------------------------  
      // return true;
      return super.onCreateOptionsMenu(menu);
      }
      @Override
      public boolean onOptionsItemSelected(MenuItem item) {
  
      String filter_id = null,Tickets_title = null;
      int start_limit=0,page_no=1;
  
      // TODO Auto-generated method stub
      switch (item.getItemId())
      { 
      case R.id.action_search:
      //Intent searchmenu = new Intent(Folders.this,SearchResultsActivity.class);
  
      //startActivity(searchmenu);
      return true;  
  
      default:
      return super.onOptionsItemSelected(item);
      }
      }   
  
  
      ------- SearchResultactivity --------------------
  
      package com.abc;
      import android.app.ActionBar;
      import android.app.Activity;
      import android.app.SearchManager;
      import android.content.Intent;
      import android.os.Bundle;
      import android.util.Log;
      import android.widget.TextView;
  
      public class SearchResultsActivity extends Activity {
  
      private TextView txtQuery;
  
      @Override
      protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.activity_search_results);
  
      // get the action bar
      ActionBar actionBar = getActionBar();
      // Enabling Back navigation on Action Bar icon
  
  
      actionBar.setDisplayHomeAsUpEnabled(true);
      txtQuery = (TextView) findViewById(R.id.txtQuery);
  
      handleIntent(getIntent());
      }
  
      @Override
      protected void onNewIntent(Intent intent) {
      setIntent(intent);
      handleIntent(intent);
      }
  
      /**
      * Handling intent data
      */
      private void handleIntent(Intent intent) {
      if (Intent.ACTION_SEARCH.equals(intent.getAction())) {
      String query = intent.getStringExtra(SearchManager.QUERY);
  
  
  
      /**
      * Use this query to display search results like 
      * 1. Getting the data from SQLite and showing in listview 
      * 2. Making webrequest and displaying the data 
      * For now we just display the query only
      */
      txtQuery.setText("Search Query: " + query);
  
  
  
      }
  
      }
      }
  
      ---------------- Activity_search_results.xml ------------------------
      &lt;?xml version="1.0" encoding="utf-8"?&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:paddingBottom="@dimen/activity_vertical_margin"
      android:paddingLeft="@dimen/activity_horizontal_margin"
      android:paddingRight="@dimen/activity_horizontal_margin"
      android:paddingTop="@dimen/activity_vertical_margin"
      tools:context="com.abc.Folders" &gt;
  
      &lt;TextView
      android:id="@+id/txtQuery"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content" /&gt;
  
      &lt;/RelativeLayout&gt;
  
  
      ----------------------Searchable.xml -------------------------------
  
      &lt;?xml version="1.0" encoding="utf-8"?&gt;
      &lt;searchable xmlns:android="http://schemas.android.com/apk/res/android"
      android:hint="@string/search_hint"
      android:label="@string/app_name" /&gt;
  
      -----------------------manifeast.xml ------------------------------
      &lt;?xml version="1.0" encoding="utf-8"?&gt;
      &lt;manifest xmlns:android="http://schemas.android.com/apk/res/android"
      package="com.abc"
      android:versionCode="1"
      android:versionName="1.5" &gt;
  
      &lt;uses-sdk
      android:minSdkVersion="14"
      android:targetSdkVersion="24"/&gt;
  
      &lt;!-- Creates a custom permission so only this app can receive its messages.--&gt;
      &lt;permission
      android:name="com.abc.pqr.C2D_MESSAGE"
      android:protectionLevel="signature"/&gt;
  
  
  
      &lt;!-- Initially app name and logo as the blank starts --&gt;
  
      &lt;application
      android:allowBackup="true"
      android:icon="@drawable/blank3"
      android:alpha="120"
      android:label=""
      android:theme="@style/MyTheme"&gt; 
      &lt;!-- Initially app name and logo as the blank ends --&gt;
  
      &lt;activity
      android:name="com.abc.pqr"
      android:label="" &gt;&lt;!-- @string/app_name --&gt;&lt;!-- app name blank if present it shows 2-3 sec when start the activity , we have to change it --&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;!-- THIS ONE  --&gt;
      &lt;meta-data
      android:name="android.app.default_searchable"
      android:value=".SearchResultsActivity" /&gt;
      &lt;!--  THIS ONE ENDS --&gt;
  
      &lt;/activity&gt;
  
  
      &lt;!-- Search results activity --&gt;
      &lt;activity android:name=".SearchResultsActivity"
      android:parentActivityName="com.abc.Folders" &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>Hello Answer is,</p>
  
  <p>Just add the following lines in the manifeast files under particular activity.In which u want to show your searchview.</p>