title: Android search from searchable activity
body: <p>I have an Activity that holds a list. Via the Android onSearchRequested() I implemented a search.
  The results are shown as a list with the same adapter in another Activity. Working fine so far.</p>
  
  <p>Also, I want to be able to search from that second Activity showing the new results in the same list.</p>
  
  <p>My AndroidManifest.xml for the two activities:</p>
  
  <pre><code>&lt;activity android:name=".ListActivity" android:label="List"&gt;
      &lt;meta-data android:name="android.app.default_searchable" android:value=".SearchActivity" /&gt;
  &lt;/activity&gt;
  
  &lt;activity android:name=".SearchActivity" android:label="Results"&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/search" android:value=".SearchActivity" /&gt;
  &lt;/activity&gt;
  </code></pre>
  
  <p>The <b>SearchActivity's</b> onResume():</p>
  
  <pre><code>@Override
  protected void onResume() {
      super.onResume();
      Intent queryIntent = getIntent();
      String value = queryIntent.getStringExtra(SearchManager.QUERY);
      setView(value);
  }
  </code></pre>
  
  <p>The setView() method does a foreach loop through all objects adding them to a result-array which is used for a new Adapter that the list shows.</p>
  
  <pre><code>ca = new CustomAdapter(this, R.layout.customadapter, resultArray);
  list.setAdapter(pa);
  list.invalidate();
  </code></pre>
  
  <p>When trying to search from the second Activity the search bar appears, I can enter my search value, send it - but the list doesn't change (and even the keyboard stays).
  What's missing?</p>
  
  <p>Edit: Tried to make it easier to understand.</p>