// populate the autocomplete with users if database exists or files have been downloaded private void populateAutoComplete() { UserList userList1 = UserDB.getAllUsers(); String[] usernameStrings = new String[userList1.size()]; usersIDs = new int[userList1.size()]; int count = 0; for (User temp : userList1) { usernameStrings[count] = temp.EmployeeNumber + " - " + temp.Surname; UserStringList.add(usernameStrings[count]); usersIDs[count] = temp.EmployeeID; count++; } ArrayAdapter adapter = new ArrayAdapter(this, android.R.layout.simple_list_item_1, usernameStrings); UsernameAutoCompleteTextView.setAdapter(adapter); UsernameAutoCompleteTextView.setThreshold(1); UsernameAutoCompleteTextView.setEnabled(true); PasswordInput.setEnabled(true); startRound.setEnabled(true); }