Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-16772] Android: Drag animation not working

GitHub Issuen/a
TypeBug
PriorityLow
StatusClosed
ResolutionDuplicate
Resolution Date2014-03-28T21:13:01.000+0000
Affected Version/sRelease 3.2.3
Fix Version/sn/a
ComponentsAndroid
Labelsqe-3.2.3, triage
ReporterPriya Agarwal
AssigneeHieu Pham
Created2014-03-28T11:27:51.000+0000
Updated2017-03-20T22:42:16.000+0000

Description

Not a regression since issue occurs in 3.2.2.GA and 3.2.1.GA also Steps to reproduce: 1. Copy paste the below given code in app.js and run the app on android device. 2. Drag Square on screen Expected Result: Drag animation should work fine. Actual Result: No drag animation observed. Drag Animation working fine on ios.
var win = Ti.UI.createWindow({
    backgroundColor : "#fff"
});
var annoViewPosition;
var view = Ti.UI.createView({
    borderWidth : 1,
    borderColor : "#000000",
    left : 0,
    top : 0,
    height: 100,
    width: 100
});
win.add(view);
  
var lbltop;
var lblleft;
view.addEventListener('touchstart', function(e) {
        annoLblPosition = {
            top : e.source.top,
            left : e.source.left
        };
        lbltop = e.y;
        lblleft = e.x;
});
  
view.addEventListener('touchmove', function(e) {
    annoLblPosition.top += e.y - lbltop;
    annoLblPosition.left += e.x - lblleft;
    e.source.animate({
        top : annoLblPosition.top,
        left : annoLblPosition.left,
        duration : 5,
    });
});
  
win.open();

Comments

  1. Hieu Pham 2014-03-28

  2. Lee Morris 2017-03-20

    Closing ticket as duplicate.

JSON Source