No 'Swipe' on TableView within View?
Got a fair bit of Titanium experience under my belt, but can't seem to figure out the 'swipe' event.
To replicate:
Create a new project (the tab base code), point one of the tab windows at a .js file, and stick a tableView in there. No matter how I try to hack it, I can't get it to pick up a 'swipe' event (though click works fine).
Any ideas? I'm wanting to swipe to navigate the data being viewed (moving to the next/previous day on a calendar view).
7 Answers
-
Yeah, it seems the tableview sees the swipe only in edit mode.
You could register touchstart and touchend events and detect if the difference for x property is bigger than N pixels - we have swipe.If is smaller than few pixels we have click :)
-
Do you want just the general swipe action, or the swipe to delete action?
If its the latter, then make sure you have editable:true in your createTableView()
-
Add touchstart to the table.
The issue is that if you have a custom row and click on an element( label by example ) you don't get the x coordinate.
can you show me how your row looks like?
-
wait a second, you have empty rows? mmm
do something else:
create a custom row like this( hope is clear )
tablerow->wrap_view( width:100%, height: your_row_height)->label
if you have data set the label else let only the wrap_view
add touchstart/end to wrap_view
it works?
-
How many visible rows are in an empty table? 9 ?
Why not create "fake" rows with empty text( or spaces ) until you reach the minimum numbers?Would this work?
-
Did you get this resolved? Ive come across the same bug, need a fix for it to complete my app
-
Did you get this resolved? Ive come across the same bug, need a fix for it to complete my app