Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-12452] Android: view (with borderwidth and child view) animated lead app to crash

GitHub Issuen/a
TypeBug
PriorityCritical
StatusClosed
ResolutionDuplicate
Resolution Date2013-06-17T22:04:39.000+0000
Affected Version/sn/a
Fix Version/sn/a
Componentsn/a
Labelsandroid, animate, children, view
Reporterlixinxin
AssigneeBiju pm
Created2012-12-26T11:12:53.000+0000
Updated2017-03-22T22:22:50.000+0000

Description

Problem

When move a view with borderwidth and the view has children by animation, app will crash.

Repro sequence

var window = Ti.UI.createWindow({
    backgroundColor : "#fff"
});

var box = Ti.UI.createView({
    width : 80,
    height : 50,
    backgroundColor : "#0f0",
    borderWidth : 2,
    layout : "vertical"
});

window.add(box);

var lbl_name = Ti.UI.createLabel({
    top : 5,
    width : 150,
    height : Ti.UI.SIZE,
    text : "hello",
    color : "#000",
    textAlign : Ti.UI.TEXT_ALIGNMENT_CENTER
});
box.add(lbl_name);

// Animation-Start
var btn_start = Ti.UI.createButton({
    title : 'Start',
    bottom : 50,
    width : 200
});
btn_start.addEventListener('click', function() {
    var a1 = Titanium.UI.createAnimation();
    a1.top = 100;
    a1.left = 100;
    a1.duration = 1000;
    box.animate(a1);

});

window.add(btn_start);

window.open();

Attachments

FileDateSize
app.js2012-12-26T11:12:53.000+0000760

Comments

  1. Biju pm 2013-06-12

    fixed the cast exception https://github.com/appcelerator/titanium_mobile/pull/4382
  2. Lee Morris 2017-03-22

    Closing ticket as duplicate and links to the related ticket have been provided above.

JSON Source