i have the code below which almost done everything i wanted, but i want to
be able to alter one of the field(KEY_TIME) to a more readable format.

because the value in column KEY_TIME is gonna be in milliseconds, simply
displaying the large value is not ready to user.

private void fillData() {

        Cursor notes= mDbHelper.fetchAllNotes();
        startManagingCursor( tasksCursor );

        String[] from = new String[] {ToDoDbAdapter.KEY_TITLE,
                                      ToDoDbAdapter.KEY_LABEL,
                                      ToDoDbAdapter.KEY_NOTE,
                                      ToDoDbAdapter.KEY_TIME};
        int[] to = new int[] {R.id.task, R.id.label, R.id.note, R.id.time};

        SimpleCursorAdapter noteAdapter =
            new SimpleCursorAdapter( this, R.layout.list_row, notes, from,
to);

        setListAdapter( noteAdapter );

    }// end fillData() method

****************************************************************************************

i want to try something like this

        for(notes.moveToFirst(); notes.isAfterLast(); notes.moveToNext()){
            // do all the formatting i want to each fields
            // add it to the list
        }

then set the adapter, the list has to be selectable for editing.

is simply don't get how to tie the list with the cursor adapter and the
list_row.xml i prepared

please help me out with some example

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to