Quantcast
Channel: Appcelerator Developer Center Q&A Tag Feed (android)
Viewing all articles
Browse latest Browse all 7655

Object disappears after animation

$
0
0

Hi, why imgView disappears after animation instead of remaining?

var win = Ti.UI.createWindow({
    layout: 'vertical',
    navBarHidden: true,
    width: '100%',
    height: '100%',
    backgroundColor: '#fff',
});
 
var view = Ti.UI.createView({
    width: '100%',
    height: '100%',
    backgroundColor: '#abc',
    layout: 'vertical', 
});
 
var img = Ti.UI.createImageView({
    backgroundColor: '#000',
    width: '20px',
    height: '20px',
 
});
 
function move(obj){
    obj.animate({
        bottom: '0px',
        duration: 1000,
    });
};
view.add(img);
win.add(view);
win.open();
 
move(img);
If I use top property it works but if I use bottom property after moving the object desappears. Thanks for the attention.

Viewing all articles
Browse latest Browse all 7655

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>