jeudi 4 février 2021

If statment not checking in android

If-statment is not checking,in the condition I try to check if an object exist in list of object, and I'm sure some object exist in the list, but when I execut the code no object is removed from the list:

                    for (int i = 0; i < amiesIdList.length; i++) {
                        for (int j = 0; j < 2; j++) {
                            Log.e("user id", String.valueOf(getUserById(amiesIdList[i][j]).getId()));
                            if (userListIns.contains(getUserById(amiesIdList[i][j]))) {
                                userListIns.remove(getUserById(amiesIdList[i][j]));
                                Log.e(" " + i, String.valueOf(amiesIdList[i][j]));
                            }
                        }
                    }

Aucun commentaire:

Enregistrer un commentaire