public ArrayList calculateTotal(){
SQLiteDatabase db = this.getWritableDatabase();
ArrayList<Integer> array_list2 = new ArrayList<Integer>();
Cursor cursor1 = db.rawQuery(
"SELECT SUM(cost) FROM expense", null);
if (cursor1.moveToFirst()) {
columntotal = cursor1.getFloat(0);
}
cursor1.close();
db.rawQuery("INSERT INTO total VALUES(columntotal)", null);
我无法总结android studio中的费用和显示....
答案 0 :(得分:0)