일단 목표는 'ListView에 있는 특정 column의 sum'을 구하기 입니다..

ListActivity 1개와 커스텀CursorAdapter가 있습니다.

ListActivity에서 ListView에 제가 만든 Adapter를 세팅합니다.
그러면 adapter가 디비를 조회하고 List를 생성해 내는데요..
보시면 제가 setAdapter한 다음에 바로 어뎁터에서 getTotalSpent해서 값을 가져오려고 시도합니다.
하지만 아직 어댑터가 동작하지 않은 상태라 0을 리턴합니다.

<< ListActivity >>

   ListAdapter adapter;
   SmsListManager manager = new SmsListManager(getBaseContext());
   cursor = manager.getRows(0, "0000-00-00 00:00:00", "9999-99-99 00:00:00");
   startManagingCursor(cursor);
   adapter = new MyCursorAdapter(this, R.layout.row, cursor, new String[] {"use_amount", "use_what",
    "use_time", "latitude", "longtitude"}, new int[] {R.id.use_amount, R.id.use_what, R.id.use_time,
    R.id.latitude, R.id.longtitude});
   smsList.setAdapter(adapter); <--- 커스텀어댑터 세팅(이 안에서 LOOP돌면서 total++해감)
   long totalSpent = ((MyCursorAdapter)adapter).getTotalSpent(); <--- 0을 리턴 
   totalSpentVal.setText(String.valueOf(totalSpent));

<< MyCursorAdapter  >>

public class MyCursorAdapter extends SimpleCursorAdapter {
 private final DecimalFormat decimalFormat;
 private long totalSpent = 0;
 public MyCursorAdapter(Context context, int layout, Cursor c, String[] from, int[] to) {
  super(context, layout, c, from, to);
  decimalFormat = new DecimalFormat("###,###");
 }
 @Override
 public void setViewText(TextView tv, String str) {
  if (tv.getId() == R.id.use_amount) {
   tv.setText(this.getMoneyFormat(str));
  } else if (tv.getId() == R.id.use_time) {
   tv.setText(this.getDateFormat(str));
  } else {
   tv.setText(str);
  }
 }
 private String getMoneyFormat(String str) {
  long spent = Long.parseLong(str);
  totalSpent = totalSpent + spent; <--- 커서를 이동해가면서 토탈을 구함.
 }


아무래도 (예를들어) CursorAdapter.onFetchCompleted() 이런식으로 커서 탐색이 완료된 이벤트 후에
sum을 구해야될 것 같은데요... 그런식의 api가 없더라구요...

ListAdapter->public void registerDataSetObserver(DataSetObserver observer)로도 안되는것 같구욤.. 음.

어떻게 하면 디비쿼리를 두번 안하고 특정 컬럼의 sum을 구해다 쓸 수 있을까요??
조언좀 부탁드립니다 ^^;

고맙습니다.