这就是我尝试将自己的日期添加到 TimeSeries 对象的方式:
private void fillData() {
DBHelper db = new DBHelper(this);
Cursor c = db.selectGewichtFromKind(id);
ArrayList<String> arr = new ArrayList<String>();
ArrayList<String> arrdate = new ArrayList<String>();
c.moveToFirst();
if(c.moveToFirst())
{
do
{
arr.add(c.getString(c.getColumnIndex("gewicht")));
arrdate.add(c.getString(c.getColumnIndex("gewichtsdatum")));
System.out.println("ARRRAY LENGHT : " + arr.size());
}while(c.moveToNext());
}
for (int i = 0; i < 100; i++) {
time_series.add(arrdate[i], i);
}
}
现在我得到一个
The type of the expression must be an array type but it resolved to ArrayList<String>
这一行的错误
time_series.add(arrdate[i], i);
如何解决这个问题呢?