我有一个列出费用和收入的清单。我希望 ListViewer 自动将背景更改为收入的绿色或费用的红色,这可能吗?
final DbCon database = new DbCon(this);
final ListView Viewer = (ListView)findViewById(R.id.historyViewer);
//date1, time1, desc1, val1, cat1, type1
final SimpleAdapter La = new SimpleAdapter(this, database.GetMonths(), R.layout.mviewer, new String[] {"month"}, new int[] {R.id.month_name});
Viewer.setAdapter(La);