Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-25853] Layout with animation differs between Android and iOS

GitHub Issuen/a
TypeBug
Priorityn/a
StatusOpen
ResolutionUnresolved
Affected Version/sRelease 8.0.0, Release 7.0.2
Fix Version/sn/a
ComponentsiOS
LabelsengSchedule, ios, parity
ReporterGuile
AssigneeEric Merriman
Created2018-02-23T10:31:44.000+0000
Updated2019-04-23T15:34:36.000+0000

Description

(very difficult to describe a visual difference) SDK 6.3 -> 7.0.2 (current) Run the following code on iOS and Android, you will see that on iOS the animated view takes its final height place in the layout while on Android the place it takes fits the "current" height during the animation

var vw = Ti.UI.createView({
    height: 300,
    width: 100,
    layout: "vertical",
    backgroundColor: "red"
});

vw.addEventListener('click', function () {
    sub.height = 1;
    sub.animate({
        height: 200,
        duration: 3000
    });
});

vw.add(Ti.UI.createView({
    height: 10,
    backgroundColor:"blue"
}));



var sub = Ti.UI.createView({
    height: 1,
    backgroundColor: "yellow",
    //top: 0   // by removing the top, the animation is weirder on iOS
});

vw.add(sub);

vw.add(Ti.UI.createView({
    height: 10,
    backgroundColor:"green"
}));


$.index.add(vw);


$.index.open();

Attachments

FileDateSize
anim_android.mp42018-02-26T11:22:13.000+0000245638
anim_ios.mp42018-02-26T11:22:13.000+0000138358

Comments

  1. Mostafizur Rahman 2018-02-25

    Hello [~gduthieuw], Thanks for sharing the issue. Can you describe more or can you share screenshot or video which will show the difference between ios and android platform? Best
  2. Guile 2018-02-26

    I've just added two videos
  3. Gary Mathews 2018-03-09

JSON Source