How to create a like Marquee in Titanium with continous mode

You must Login before you can answer or comment on any questions.

Please say me how to create a marquee in titanium for android

— asked 8 months ago by Vijay B
0 Comments

7 Answers

Accepted Answer

Hello Vijay,

Try this...

var win = Titanium.UI.createWindow({
    title : 'Marquee',
    backgroundColor : '#fff'
});
 
var view = Ti.UI.createView({
    width : '100%',
});
var label = Titanium.UI.createLabel({
    left : 0,
    color : 'black',
    text : 'Marquee Testing'
});
var left = true;
var animation = Titanium.UI.createAnimation();
animation.duration = 1000;
animation.left = 0;
var animationHandler = function() {
    if (left) {
        animation.left = 190;
        left = false;
    } else {
        animation.left = 0;
        left = true;
    }
 
    label.animate(animation);
};
animation.addEventListener('complete', animationHandler);
label.animate(animation);
 
view.add(label);
win.add(view);
 
win.open();

— answered 8 months ago by Ritesh .
answer permalink
8 Comments
  • also refer this LINK,

    I hope it will help you, Best Luck...

    — commented 8 months ago by Ritesh .

  • thanks... it will work nicely....

    — commented 8 months ago by Vijay B

  • you welcome.....

    — commented 8 months ago by Ritesh .

  • Show 5 more comments

I am try this code :

var win = Titanium.UI.createWindow({ title:'Marquee', backgroundColor:'white' });

                                     var view = Ti.UI.createView({
                                        top: 20,
                                        width:"300",
                                        height:"100",
                                        backgroundImage:"inner.png"
                                            });

                                    var label = Titanium.UI.createLabel({
                                        width:"auto",
                                        height:"auto",
                                        color:'red',
                                        left:0,
                                        text:'This is SetuBridge...'
                                    });

                                    var animation = Titanium.UI.createAnimation({
                                        //left:100,//left side 0
                                        right : 0,
                                        duration:1000,
                                        autoreverse:true,


                                        });
                                        animation.addEventListener('complete',function() 
                                        {
                                                label.animate(animation); 
                                        });

                                    label.animate(animation);


                                    view.add(label);
                                    win.add(view);
                                    win.open();

How to create option Button, Radio Button and drop down list view. have you any example in titanium. eg. option for checking Male/Female drop down for select country,state etc...

give me demo apps of Radio Button , Drop Down in titanium...

Your Answer

Think you can help? Login to answer this question!