If I understand your question correctly, it seems like your primary issue is determining which element has been clicked on within the adapter. You may need to switch from bindview and newview to just using getview. If you do, you can just add an onClicklistener to the view before getView returns it.
This way, each row in the list has its own listener and can update the correct row in the db. Any particular information that the onClickListener needs to run the correct database update method (ie the rowId) can also be passed into the listener with a Tag on the view. Hope that helps.
User659874 and Frenkenstein. Thx for giving me a hint. I haven't got alot of time in the last couple of days but as soon as possible I will start a new try and report back.
Thx so far. – m0rb May 30 at 20:41 I think I still have a basic understanding problem. I'm not sure how to use the Cursor adapter.Do I have to create an Object of my CursorAdapter class and pass it a cursor?
And where do I have to define the onClick Method you talked about? Within the CursorAdapter or in the Activity where I create the listview? Sorry for being a bit stubborn here... – m0rb May 30 at 21:23 I forgot to mention your flag so that you get notified.
I asked another question and would be thankful to hear from you again. – m0rb May 31 at 22:24.
I'm trying to implement a CursorAdapter in my Android App. I read different tutorials and tried out different things but it won't work! I found one question here very similar to mine but I didn't get the idea out of it.
I got a Database with multiple tables and foreign keys and so on. Extension of the SQLiteHelper class to work properly. In a ListView.
The returning object is a wrapped ArrayList> . Update that specific row in the DB with some new data the user put into a EditText box. Pretty simple task actually but I think I just don't understand the usage of the CursorAdapter.
I hope someone can help me out with my problem or give me a hint where I have to go to get this working.
I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.