if(checkExist(_id, temp)){
if(Settings.DebugMode) Log.i(Settings.MAKE_DECK, "ID already exist, skipping ID# " + String.valueOf(_id));
}else{
ArrayList<String> al = new ArrayList<>(
Arrays.asList(
_id, _ru, _pro, _en, _audio, _type, _gender,
_category, _date, _active, _trouble,
_correct, _incorrect
)
);
//Log.i("TEST", _id);
temp.add(al);
i++;
}
//
// checkExist()
//
public static boolean checkExist(String num, ArrayList<ArrayList<String>> temp){
for(ArrayList<String> a : temp){
if(a.get(0).equals(num)){
return true;
}
}
return false;
}
Comments