参见下面的代码,我想得到列表中ArrayList的所有元素。
下面的代码怎么可能?
for (k = 0; k < lists.size(); k++) {
name = String.valueOf(list.get(k));
number = String.valueOf(list.get(1));
number = number.substring(2);
Type = String.valueOf(list.get(2));
Date = String.valueOf(list.get(3));
Duration = String.valueOf(list.get(4));
if (Type.equals("OUTGOING")) {
calltype = String.valueOf(CallLog.Calls.OUTGOING_TYPE);
} else if (Type.equals("MISSED")) {
calltype = String.valueOf(CallLog.Calls.MISSED_TYPE);
} else if (Type.equals("INCOMING")) {
calltype = String.valueOf(CallLog.Calls.INCOMING_TYPE);
RestoreCallLogs(name, number, calltype, Date, Duration);
}
}