[TIMOB-14619] Android: autoreverse=true works once, then element disappears; callback works fine
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Low |
Status | Open |
Resolution | Unresolved |
Affected Version/s | Release 3.1.1 |
Fix Version/s | n/a |
Components | Android |
Labels | android, animation |
Reporter | Tim Poulsen |
Assignee | Unknown |
Created | 2013-07-22T20:58:05.000+0000 |
Updated | 2018-02-28T20:03:45.000+0000 |
Description
The following simple app demonstrates the issue with autoreverse:
Tap the first label and it will animate to zero opacity and back once. Tap it again and it disappears (goes to opacity=0 instantly). This label is animated using autoreverse=true
Tapping the second box, the label correctly animates to zero opacity and back to opacity=1 as many times as you want to tap the label. This label is animated using a callback function with autoreverse unspecified.
<Alloy>
<Window class="container">
<Label id="label" onClick="doClick">Click Me</Label>
<Label id="label2" onClick="doClick2">Click Me</Label>
</Window>
</Alloy>
".container": {
backgroundColor:"white",
layout: 'vertical'
},
"Label": {
width: 300,
height: 100,
top: 50,
color: "#fff",
backgroundColor: 'red',
textAlign: Ti.UI.TEXT_ALIGNMENT_CENTER
},
"#label2": {
backgroundColor: 'green'
}
function doClick(e) {
$.label.animate({
opacity: 0,
duration: 2000,
autoreverse: true
});
}
function doClick2(e) {
$.label2.animate({
opacity: 0,
duration: 2000
}, function() {
$.label2.animate({
opacity: 1,
duration: 2000
})
});
}
$.index.open();
Possible regression. See TIMOB-8091
No comments