I am new to Android programming and I have a ListView when the filter always returns me the first item in the list, so how can I fix this?
For example, my list contains AA, AB, AC, BC, BD. When I want to search the list of things starting with B, I will get BC, BD, but when I press BC, it will return AA and BD to me, it will return AB to me
public class PatientList extends Activity{ PatientDB patientDB; Context myContext; ListView lv_patients; EditText et_patients; ArrayAdapter<String> adapter; ArrayList<HashMap<String, String>> patientList; static String value; String[] patientarray = new String[]{"initials"}; ArrayList<String> patientArrayList = new ArrayList<String>(); @Override protected void onCreate(Bundle savedInstanceState) {
}
source share