Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-17539] Android: Adding swipe to window with table view causing lag while scrolling table view

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionWon't Fix
Resolution Date2014-12-01T18:13:12.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsAndroid
LabelsTCSupportTriage, android-4.4, exalture, look1, scroll, swipe, tableView, window
ReporterShankar Agarwal
AssigneeSunila
Created2014-07-23T11:18:46.000+0000
Updated2018-08-02T22:20:05.000+0000

Description

I found that attaching a 'swipe' event handler to a window with the goal of allowing swiping left and right to change content is having the unintended side effect of preventing the native scroll behavior on a table view contained in the window on Android. Normally when you swipe down (fling) on a table view, there's some inertia and the table view keeps scrolling for a little bit. When there is a 'swipe' event handler on a table view and you swipe down on a table view, as soon as you lift your finger off the screen the table view motion stops. There is no inertia. The scrolling stops as soon as the finger is lifted, making it hard to scroll through a long list. iOS doesn't seem affected. The swipe handler works and native scroll works as expected.

Comments

  1. Shuo Liang 2014-07-24

    Hi, Would you please provide use a simple test case for the problem you mentioned. Thanks. Regards, Shuo
  2. Neville Dastur 2014-08-02

    I have this problem too. I have created a demo project at [https://github.com/ClinicalSoftwareSolutions/DemoBug/tree/swipe_prevents_list_scrolling] to demonstrate the problem My environment is Ti SDK 3.3.0.GA, OSX 10.9, Android 4.4.4 and tested on Samsung S5 hardware + Genymotion S5,S4 and S3 emulator. There is also a report in the forums about the same problem on a LG L2 This demo project also demonstrates another bug. Swipe left and right does not seem to be detected.
  3. Neville Dastur 2014-08-05

    Just to say that this has been labelled with tableView, but effects the listview component too. Thanks
  4. Sunila 2014-09-17

    Make sure that we don't consume the fling event by returning true. https://github.com/appcelerator/titanium_mobile/pull/6114
  5. Hieu Pham 2014-12-01

    The above PR is a suitable workaround. We won't merge it in master as it will break apps that rely on 'swipe' being consumed.
  6. Eric Merriman 2018-08-02

    Closing old "Won't fix" tickets. If you disagree, please reopen.

JSON Source