public void addHeader(){
String items[]={ "DATE", "INCOME","EXPENCE","PROFIT","LOSS","REMARKS"};
for (String strText:items) {
HashMap<String, String> map = new HashMap<String, String>();
map.put("ItemText",strText);
srcTable.add(map);
}
saTable.notifyDataSetChanged();
}
public void addData(){
for(int i=0;i<3;i++){
String items[]={ "12/10/2013", "500","100","400","000","GOOD"};
for (String strText:items) {
HashMap<String, String> map = new HashMap<String, String>();
map.put("ItemText",strText);
srcTable.add(map);
}
}
saTable.notifyDataSetChanged();
}
我上面的代码我想使用add data()函数从数据库中获取数据,对于哪个查询我必须传递而不是“500”,“100”等....