Hi all,

I would be VERY greatful if you could help me with this one, its
literally driving me insane, been trying to do this for 2 days now.

I have a listview, now what I want to do it is, when a position in the
listview gets clicked on, it changes the icon for that position, to a
drawable named "ok.png" . Simple,

Below is the method I use to fill the ListView

Java:

    private void fillData() {
        // Get all of the notes from the database and create the item
list
        Cursor c = mDbHelper.fetchAllNotes();
        startManagingCursor(c);

        //String[] from = new String[] { DbAdapter.KEY_TITLE };

        int[] to = new int[] { R.id.text1 };

        // Now create an array adapter and set it to display using our
row
        SimpleCursorAdapter notes =
            new SimpleCursorAdapter(this, R.layout.row, c, from, to);

        setListAdapter(notes);




    }



and the array that is first declared:

Java:

public class QuickList extends ListActivity implements
View.OnClickListener{
     //declares
     Button add;
     EditText input;
     private DbAdapter mDbHelper;
     private int mNoteNumber = 1;
    private static final int DELETE_ID = Menu.FIRST;
    String[] from = new String[] { DbAdapter.KEY_TITLE };



I would REALLY appreciate some help with this.

Thanks in advance.

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

Reply via email to