title: Return multiple columns in Android Search Dialog
body: <p>I'm just now figuring out how to implement a Search Dialog in my Android app. I've got it working, but it only outputs one column. I think I see how to make it search multiple columns (in my case three columns), but Eclipse says I'm wrong. Here's my method to get the records in my DBAdapter class:</p>
  
  <pre><code>    //--- GET RECORDS FOR SEARCH
  public Cursor searchDB(String query) {
  String[] allColumns = new String[]{ KEY_COLUMN1, KEY_COLUMN2, KEY_COLUMN3 };
  return db.query(true, DB_TABLE, new String[] { KEY_ROWID,
  KEY_COLUMN1, KEY_COLUMN2, KEY_COLUMN3 }, KEY_COLUMN1 + " LIKE" + "'%" + query +             "%'", null, null, null, null, null);
  }
  //--- END Get Records for Search
  </code></pre>
  
  <p>and here's the method in the activity to display the returned results:</p>
  
  <pre><code>    //--- Show Results method
  private void showResults(String query) {        
  Cursor cursor = DBHelper.searchDB(query);
  startManagingCursor(cursor);
  String[] from = new String[] { DBAdapter.KEY_COLUMN1 }; //--- change this?
  int[] to = new int[] { R.id.text1 };
  SimpleCursorAdapter records = new SimpleCursorAdapter(this,
          R.layout.record, cursor, from, to);     
      setListAdapter(records);
  }
  //--- END Show Results method
  </code></pre>
  
  <p>Right now, the string[] allcolumns isn't being used. and I assumed that I'd use it by doing</p>
  
  <pre><code>allcolumns + " LIKE"
  </code></pre>
  
  <p>in the DBAdapter class' SearchDB() method, and <code>DBAdapter.allcolumns</code> in the showResults method. But allColumns isn't offered as an option in the showResults() method. What's the deal? How can I return multiple DB columns with a Search Dialog?</p>