@Override public View getView(int position, View convertView, ViewGroup parent) { View v = convertView; if (v == null) { LayoutInflater vi = (LayoutInflater) getSystemService(Context.LAYOUT_INFLATER_SERVICE); v = vi.inflate(R.layout.report_row, null); } Report report = getItem(position); fillText(v, R.id.reportName, report.getName()); fillText(v, R.id.reportDateFrom, df.format(report.getDateFrom())); fillText(v, R.id.reportDateTo, df.format(report.getDateTo())); return v; }
private void fillList() throws SQLException { Log.i(TAG, "Show list again"); List<Report> list = Report.getReportList(this, walletFather); ArrayAdapter<Report> arrayAdapter = new ReportAdapter(this, R.layout.report_row, list); setListAdapter(arrayAdapter); }