I'm looking to read some product details in from a database and then add them to a ListView.
I then want on each line a qty EditText box where customer can add a qty in. How can I do this? I did a simple page but when I enter a qty and the scroll down and then back up again I loose the data or it even appears in another qty box on another row.
You should save state(content entered by user in EditText) in some sort of array, supplied to your list adapter. Probably you create new EditText in getView() method of your list adapter.
Okay so the first thing you will need to do is create a Row.xml file for the layout that you want each row in the list to have..
Next you will need to extends listview and override get view to load in your custom row.
Thats what you will need to get started you can then call onItemListClick() to get each click when the user clicks the item.
You can get a full tutorial here...
Tutorial
EDIT:
Also if you want to save the number in the quantity box you will need to have a Bundle. Such as saveState() method
This will save your users quantity number while the app is still alive, and when brought back into view pull the number or int from the bundle.
This should be of help
http://www.edumobile.org/android/android-beginner-tutorials/state-persistence/
Hi below is the code i have been playing around with