if (cbIsGap.isChecked() == true) {
Toast.makeText(getActivity(),"Please uncheck Is Gap", Toast.LENGTH_LONG).show();
}else{
try {
Cursor c = db.rawQuery("Select ConsAcNo From FieldUtilityData Where ConsAcNo like '%" + txtConsAcNo.getText() + "%' Limit 15 ", null);
//Cursor c = db.rawQuery("SELECT * FROM FieldUtilityData ",null);
final String[] str = new String[c.getCount()];
int i = 0;
if (c.moveToFirst()) {
do {
//assing values
String column2 = c.getString(0);
str[i] = c.getString(0);
i++;
} while (c.moveToNext());
}
c.close();
ArrayAdapter<String> adapter = new ArrayAdapter<String>(getActivity(),
android.R.layout.simple_dropdown_item_1line, str);
adapter.setNotifyOnChange(true);
txtConsAcNo.setAdapter(adapter);
} catch (Exception e) {
}
}
Above is my code. Now what i want that when check box is checked i dont want to show autocomplete suggetion. But in my case its showing suggestion