Note that there are some explanatory texts on larger screens.

plurals
  1. POAndroid: Search Dialog doesn't appear
    primarykey
    data
    text
    <p>I'm currently trying to implement a Search in my App. I followed <a href="http://developer.android.com/guide/topics/search/search-dialog.html" rel="nofollow">Google's Tutorial</a> but now, when i press the "Search"-Button (on the Device/Emulator), nothing appears. I'm not sure why.</p> <p>My searchable.xml File:</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/label_search" android:hint="@string/search_hint" android:includeInGlobalSearch="true" &gt; &lt;/searchable&gt; </code></pre> <p>This is the Android Manifest part for the Search-Activity:</p> <pre><code> &lt;!-- Search Activity --&gt; &lt;activity android:name=".SearchNotes"&gt; &lt;intent-filter&gt; &lt;action android:name="android.intent.action.SEARCH" /&gt; &lt;category android:name="android.intent.category.DEFAULT" /&gt; &lt;/intent-filter&gt; &lt;meta-data android:name="android.app.searchable" android:resource="@xml/searchable" /&gt; &lt;/activity&gt; </code></pre> <p>The Code which populates my ListActivity:</p> <pre><code>private void searchAndDisplay(String query){ SQLiteDatabase db = db_con.getReadableDatabase(); final Cursor c = db.rawQuery( "SELECT headline, id as '_id' FROM entry WHERE " + "(headline LIKE '%?%') OR (content LIKE '%?%') ", new String[]{query, query}); this.startManagingCursor(c); final ListAdapter searchAdapter = new SimpleCursorAdapter( this, android.R.layout.simple_list_item_2, c, new String[] {"headline", "_id"}, new int[] {android.R.id.text1, android.R.id.text2}); this.setListAdapter(searchAdapter); db.close(); } </code></pre> <p>This doesn't work in the Emulator, neither on my Android-Device. What am I missing here?</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload