I have a listview and i would like to populate a row with several calculations done on multiple database tables rows winch carry the row id as column (group).
So for example one of my database tables has three rows all of winch have a unique row id for one coloumn and also another column (group) which has the same value for all rows allowing them to be grouped together.
What i would like to do is pass a cursor over each row which has the same value in the column group and do a few things on each row like add,minus,subtract etc. and then add the result from each row to a value which i can then attach to the list view.
How can i go about doing this?
You can put the results in an
Arrayand then do your operations you want on each item. Then you use anarrayAdapterto put the items in it.This method gives you all the results of a cursor back in a two-dimensional array. If you only have one column, you just use the method and put
[0]after it to put it in one array.Example: