Issue description
TableViewRow has a view inside (where there are more children objects) for showing custom data. These Rows must be collapsed and expanded using an animation or just setting the row which changes its height. Once the row is expanded, all the rows must be shown.
The problem developer is facing is that these animations are being sloppy and the whole TableView starts blinking once the animation starts.
We have already used an animation and a View inside the tableViewRow which contains all the custom views and we have testing animating, a warning appears at the console:
[DEBUG] : Application booted in 212.884963 ms
[WARN] : New layout set while view [object __alloyId2] animating: Will relayout after animation.
[WARN] : New layout set while view [object __alloyId2] animating: Will relayout after animation.
[WARN] : New layout set while view [object __alloyId70] animating: Will relayout after animation.
[WARN] : New layout set while view [object __alloyId2] animating: Will relayout after animation.
...
Using 'app/controllers/index.js' and 'app/styles/index.tss' instead of commented out sections gets rid of the warning below although we haven't been able to achieve a decent result since from time to time the flickering persists.
Steps to reproduce
Launch sample demo project showing this blink once you click on a row.
Click either first, second or the third row to collapse or expand contents. The row flickers showing a red background (app/styles/index.tss).
<TableViewRow class="row">
<View class="rowWrapper">
<Label class="label" />
<Label class="Secondlabel" />
</View>
</TableViewRow>
If you remove the nested view and try out to add a transparent background the children objects will eventually disappear and appear as the user collapse-expand a TableViewRow (app/styles/index.tss).
<TableViewRow class="row">
<Label class="label" />
<Label class="Secondlabel" />
</TableViewRow>
Classic Titanium
There are two issues I can see. First that the red background is showing through. This issue has been reported multiple times and the workaround also has been posted. iOS will clear out the background of all subviews of TableViewCell when the cell is highlighted. This is native behavior. The simple workaround is to use a backgroundImage on the view instead of a background color. Second issue here is that you are trying to animate the height of the tableView row. You **can not** animate the height of a tableView row because when the height changes, the row has to reload. When a row reloads we have to layout the subviews and the warning you are seeing is because the layout cycle is triggered while the row is animating. What you should really be doing is updating the row. Posting sample code below which shows the expanding and collapsing table view rows. Going to mark this as Won't Fix
Closing ticket as "Won't Fix".