Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-4979] Android: Expose "dragstart" and "dragend" event on ScrollView (Parity)

GitHub Issuen/a
TypeNew Feature
PriorityMedium
StatusClosed
ResolutionFixed
Resolution Date2017-05-23T17:24:23.000+0000
Affected Version/sRelease 1.7.2
Fix Version/sRelease 6.2.0
ComponentsAndroid
Labelsandroid, dragend, dragstart, parity, scroll
ReporterMarshall Culpepper
AssigneeGary Mathews
Created2011-08-10T14:54:11.000+0000
Updated2017-05-31T16:38:23.000+0000

Description

API 11 recently exposed the onDragEvent listener in View, which would allow us to reach parity by exposing the dragStart and dragEnd events on Titanium.UI.ScrollView. http://developer.android.com/reference/android/view/View.html#onDragEvent(android.view.DragEvent)

Comments

  1. Marshall Culpepper 2011-08-10

    Feature parity w/ iOS
  2. Wilson Luu 2012-01-25

    Bug still persists on: SDK build: 1.8.1.v20120124200134 Runtime: v8 Titanium Studio, build: 1.0.8.201201210622 Device: Nook Color (2.2)
  3. Paras Mishra 2014-01-15

    It is reproducible. Tested on: Device : Google Nexus 7, Android Version: 4.4.2 SDK: 3.2.1.v20140114125643 CLI version : 3.2.1-beta OS : MAC OSX 10.9 Alloy: 1.3.1-beta2 ACS: 1.0.11 npm:1.3.2 Appcelerator Studio, build: 3.2.1.201401091743 titanium-code-processor: 1.1.0 XCode : 5.0.2
  4. Rene Pot 2017-04-13

    Can we get a re-evaluation of priority of this ticket?
  5. Michael Gangolf 2017-04-17

    PR: https://github.com/appcelerator/titanium_mobile/pull/8968 I just used dragstart/dragend (lowercase) since the uppercase version is deprecated! Testcase
       var win = Ti.UI.createWindow({
       	backgroundColor: "#fff"
       });
       var scrollView = Ti.UI.createScrollView({
       	height: Ti.UI.FILL,
       	width: Ti.UI.FILL,
       	contentHeight: 4000,
       	scrollType: "vertical"
       })
       
       function onScrolling(e) {
       	console.log("Scrolling");
       }
       
       function onDragstart(e) {
       	console.log("---Drag start---");
       }
       
       function onDragend(e) {
       	console.log("---Drag end---");
       }
       scrollView.addEventListener("scroll", onScrolling);
       scrollView.addEventListener("dragstart", onDragstart);
       scrollView.addEventListener("dragend", onDragend);
       win.add(scrollView);
       win.open();
       
    Output: {noformat} [INFO] ---Drag start--- [INFO] Scrolling [INFO] Scrolling [INFO] Scrolling [INFO] ---Drag end--- [INFO] Scrolling [INFO] Scrolling [INFO] Scrolling [INFO] Scrolling [INFO] Scrolling [INFO] Scrolling ... {noformat} when flicking the screen (drag end is fired when the finger is not touching the screen anymore)
  6. Samir Mohammed 2017-05-31

    FR Passed using SDK Version 6.2.0.v20170531081104. Test and other information can be found at: https://github.com/appcelerator/titanium_mobile/pull/8968

JSON Source