Android public void search(View view)
<p>I am using the code found here.</p>

<p>The summary is that there is an xml file with an EditText and a Button called search. When search is clicked it is meant to search an SQLite db. I have added Log tracking to the oncreate and search methods but only the oncreate is running. This leads me to think that the search method is not executing when the button is clicked.</p>

<p>I know that the easy work around is to set and onclick listener. I am just wondering if the way the code is written at the moment is missing something or old and depreciated? </p>

<pre><code>public void search(View view) {
    Log.v("SEARCH", "Was run    ");
    // || is the concatenation operation in SQLite
            cursor = db.rawQuery("SELECT * FROM employee" , null);
            adapter = new SimpleCursorAdapter(
                            this, 
                            R.layout.employee_list_item, 
                            cursor, 
                            new String[] {"firstName", "lastName", "title"}, 
                            new int[] {R.id.firstName, R.id.lastName, R.id.title});
            employeeList.setAdapter(adapter);
}
</code></pre>

<p>Any help is appreciated.</p>

<p>Max</p>
