Hey all. I've been hoping/waiting for the awesome appcelerator team to create the functionality similar to iOS MAIL where you can click EDIT and select multiple rows. I can't wait much longer so I am trying to do it myself.
Each of my rows have the following: - icon on left side (75x75) - right view with layout:vertical; so I can stack a few labels in it. - labelA auto height (length can vary) - labelB - labelC (B and C are in its own view so they can be left and right of each other)
On click of an EDIT button an imageView showing a "deselected" circle appears in each row. When a user selects a row I change the imageView image to a "selected" circle. (when I do so the image flickers quickly before it appears..I can live with that but not my big issue)
My results are sets of 50 with a PULL to LOAD MORE at the bottom which appends more rows. When in EDIT mode the user clicks "CANCEL" I iterate through the tableview data again and hide all imageViews of the "selected/deselected" buttons with:
var dataCount = feedTableView.data[0].rowCount; var dataSet = feedTableView.data[0].rows; for (var c=0;c < dataCount; c++){ dataSet[c].children[2].show(); // also tried visible:false; dataSet[c].isSelected = false; }I do something similar with a "Select All" / "Deselect All" button.
The PROBLEM is that its REALLY slow when I iterate through. Even if I'm scrolled just 1/2 way down the 50 results, I sometimes have to wait a couple of seconds to have the row icon change. I'm not sure if I'm doing something wrong or if its just the nature of appcelerator or javascript or the iphone or a combination of them all.
Does anyone have any experience or suggestions on how to speed this up?
And a follow up question, Is it ok to set the rowClass to the same value for each row which are mostly similar though rows vary in height and can be toggled on or off. I assumed so but just thought I would ask.
Any feedback is appreciated.
1 Answer
Hi,
old post, I'm try to doing same. Maybe i found a solution, build a row bigger than max width of device, and animate the tableView on left or right...
Kind regards
Pierre
Your Answer
Think you can help? Login to answer this question!