public void onTextChanged(CharSequence cs, int arg1, int arg2, int arg3) {
helper = new DBhelper_D(this);
db = helper.getReadableDatabase();
String keyword = cs.toString().trim();
String whereClause = "name like ?";
String[] whereArgs = new String[]{
keyword + "%",
};
Cursor c = db.query(helper.TABLE, null, whereClause, whereArgs,
null, null, null);
adapter = new SimpleCursorAdapter(
this,
R.layout.guest_row_dd,
c,
new String[]{DBhelper_D.C_NAME, DBhelper_D.C_COUNT, DBhelper_D.C_INVITE},
new int[]{R.id.guestrowname, R.id.guestrowcount, R.id.guestrowinvite});
guestList.setAdapter(adapter);
}