How to change text of items in ListView when it is displayed using SimpleCursorAdaptor? Here is my code.
Cursor allTaskcursor = databaseHelper.getAllTasks();
String[] from = {"name", "date"};
int[] to = new int[] {android.R.id.text1, android.R.id.text2};
SimpleCursorAdapter cursorAdapter = new SimpleCursorAdapter(context, android.R.layout.simple_list_item_2, allTaskcursor, from, to, CursorAdapter.FLAG_REGISTER_CONTENT_OBSERVER);
allTaskListView.setAdapter(cursorAdapter);
getAllTasks() returns a cursor where date is an Integer value (example 10) which is displayed in android.R.id.text2. I want to change that text (example "10 days").