@Override public View getView(int position, View covertView, ViewGroup arg2) { View v = covertView; if (v == null) { v = LayoutInflater.from(mContext).inflate(R.layout.recording_list_item, arg2, false); } TextView title = (TextView) v.findViewById(android.R.id.text1); TextView date = (TextView) v.findViewById(android.R.id.summary); TextView lengthView = (TextView) v.findViewById(android.R.id.text2); RecordingItem item = getItem(position); title.setText(item.getName()); date.setText(getTime(item.getTime())); lengthView.setText(getLengthString(item.getLength())); return v; }
@Override public void remove(RecordingItem item) { mDatabase.removeItemWithId(item.getId()); super.remove(item); }