Topener / nl.fokkezb.pullToRefresh

Widget to implement a table pull-to-refresh header in Titanium Alloy
184 stars 60 forks source link

Enhancement for Android #22

Closed wiltonkkw closed 9 years ago

wiltonkkw commented 10 years ago

I found the scroll is not smooth in Android TableView. I have added some code to make the scroll smoother especially for long list.

after line 164:

offset = e.firstVisibleItem;

add the following lines:

if (offset == 0) { parentSymbol.addEventListener('swipe', swipeListener); } else { parentSymbol.removeEventListener('swipe', swipeListener); }

The reason adding these lines is because the swipe makes the scroll become swipe. So, I add the code to check if the firstVisibleItem is not the first row of the table. It will add back when the first row become the firstVisibleItem again.

FokkeZB commented 10 years ago

Can you do a pull request so you get the credits and I can test more easy? Note that the widget just doesn't work that well on android due to limitations in the event API.

FokkeZB commented 9 years ago

Closing for #30