setTitleControl is not working fine in mobile web

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

Hi I am developing a titanium application which uses setTitleControl in mobile web to set the title for window. I am using navigation group to add the windows into the stack. The setTitleControl is working fine when I execute the application in web browser. But If I execute the same in Mobile browser the title is not aligning exactly center. Can anyone share the solution. Here is my code...

exports.TitleView = function(title) {

var lblTitle = Ti.UI.createLabel({ text : title, verticalAlign : 'center',
color : 'white', font : { fontWeight : 'bold' }

});

var viewTitle = Ti.UI.createView({ width : Ti.UI.SIZE, height : Ti.UI.SIZE });

viewTitle.add(lblTitle); return viewTitle; };

I am calling this function incase of mobile web only. Still I am getting the same problem. In case of mobile web I am calling the above function. The above function is returning View object. I am using the view obejct as

var title = TitleView('title for the window');

window.setTitleControl(title);

This is the way I am setting the view using setTitleControl method of window in mobile web. In some cases the window title is getting changed. But the color of title is not getting changed in some cases even though I mentioned color:'white'. And more over it is not aligining exactly center even though I applied VerticalAlign:'center'.

Can anyone share the solution ASAP...

Thanks in Advance

Your Answer

Think you can help? Login to answer this question!