Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-16937] Android: Animation does not work properly for round views

GitHub Issuen/a
TypeBug
PriorityLow
StatusOpen
ResolutionUnresolved
Affected Version/sRelease 3.2.3
Fix Version/sn/a
ComponentsAndroid
Labelsanimation
ReporterFix Please
AssigneeUnknown
Created2014-05-07T14:50:25.000+0000
Updated2018-02-28T20:04:08.000+0000

Description

Round view animation looks weird. See the images attached.
<Alloy>

  <Window id="theWindow" class="container">
    <View left="40" top="40" width="110" height="110" backgroundColor="#ff5"></View>
    <View left="60" top="60" width="100" height="100" backgroundColor="#5ff"></View>
    
    <View left="180" top="40" width="110" height="110" backgroundColor="#ff5"></View>
    <View left="200" top="60" width="100" height="100" backgroundColor="#5ff"></View>
    
    <View left="320" top="40" width="110" height="110" backgroundColor="#ff5"></View>
    <View left="340" top="60" width="100" height="100" backgroundColor="#5ff"></View>

    <Button left="50" top="190" onClick="onButton">Start Animation</Button>
    
    <Label id="label" left="50" top="170"></Label>
  </Window>

</Alloy>
var viewDescriptors = [
  { backgroundColor: 'blue', borderRadius: 100, width: 100, height: 100, left: 50, top: 50 },
  { backgroundColor: 'blue', borderRadius: 50, width: 100, height: 100, left: 190, top: 50 },
  { backgroundColor: 'blue', width: 100, height: 100, left: 330, top: 50 }
];

var views = [];

function onButton(e) {
  views.forEach(function(view) {
    var animation = Ti.UI.createAnimation({
      duration : 20000,
      top : view.top + 3,
      left : view.left + 3
    });
    
    $.label.setText($.label.getText() + "([" + view.left + "," + view.top + "] -> [" + animation.left + "," + animation.top + "]) ");
    view.animate(animation);
  });
}


$.theWindow.open();

viewDescriptors.forEach(function(descriptor) {
  var view = Ti.UI.createView(descriptor);
  views.push(view);
  $.theWindow.add(view);
});

Attachments

FileDateSize
final_screen.jpg2014-05-07T14:50:25.000+000024757
initial_screen.jpg2014-05-07T14:50:25.000+000023732
intermediate_screen_1.jpg2014-05-07T14:50:25.000+000028518
intermediate_screen_2.jpg2014-05-07T14:50:25.000+000027227
roundviewtest.avi2014-05-08T18:00:08.000+00004665284

Comments

  1. Ritu Agrawal 2014-05-07

    [~fixplease] Thank you for the screenshot and the test case. I am sorry, but I am not seeing the same behavior (intermediate and final screenshots) for the round views. I tried it on Samsung Galaxy S4 device. Are you using any specific device?
  2. Fix Please 2014-05-08

    The original screenshots were made on *Samsung GT-N8000 / Android 4.1.2*. In addition to that I've just recreated the issue on *Samsung GT-I9152 / Android 4.2.2* and android emulator as well. Btw, in order to be sure we are on the same ground I've created a new project from the scratch and copy/pasted the code and markup from the bug report. And the new project was used to recreate the issue.
  3. Ritu Agrawal 2014-05-08

    [~fixplease] I still don't see any difference in the code above. Can you please make sure you have copied/pasted the code here? I also see a new ticket TC-4102 as well and assuming its different one.
  4. Fix Please 2014-05-08

    {quote} Can you please make sure you have copied/pasted the code here? {quote} I've attached a video on how I do copy/paste, build and run the code. Take a look, please. And I've checked the same newly created project on the GT-N8000 as well. The issue was recreated on the device exactly the same as before. {quote} I also see a new ticket TC-4102 as well and assuming its different one. {quote} Right. The TC-4102 is a different one. Investigate the issue as well, please.
  5. Ritu Agrawal 2014-05-08

    Thanks. Will check.
  6. Fix Please 2014-05-08

    I've just recreated the issue on *Samsung GT-S7562 / Android 4.0.4*.
  7. Ritu Agrawal 2014-05-09

    Moving this ticket to engineering as I can reproduce this issue with the provided test case. Same test case works on iOS platform as expected.
  8. Fix Please 2014-05-30

    any update on the issue, please?

JSON Source