Here is the code:
var textfield = Titanium.UI.createTextField({ color:'#336699', value:'Focus to see keyboard w/ toolbar', height:35, width:300, top:10, borderStyle:Titanium.UI.INPUT_BORDERSTYLE_ROUNDED, keyboardToolbar:[flexSpace,camera, flexSpace,tf,flexSpace, send,flexSpace], keyboardToolbarColor: '#999', keyboardToolbarHeight: 80 });my problem is cannot set keyboardToolbarHeight. And I aslo tried to create a toolbar like this:
var toolbar = Titanium.UI.createToolbar({ items:[flexSpace,camera, flexSpace,tf,flexSpace, send,flexSpace], bottom:0, borderTop:true, borderBottom:false, translucent:true, barColor:'gray', height:80 });It did't work,neither .Can anyone help me? Thank you so much.....
2 Answers
Hi!What do you mean you can not set the keyboardToolbarHeight? What is your tf, can you post your code for that part?I have to add a textfield to the toolbar!
I have no problems with the height, here is my code. But in my case, the toolbar is at the bottom of the window and when I want to write something it doesn't go up with the keyboard that appears..no idea why
var send = Titanium.UI.createButton ({ //style : Titanium.UI.iPhone.SystemButtonStyle.DONE image: 'send_button.png' }); var camera = Titanium.UI.createButton ({ systemButton : Titanium.UI.iPhone.SystemButton.CAMERA, }); var cancel = Titanium.UI.createButton ({ systemButton : Titanium.UI.iPhone.SystemButton.CANCEL }); var flexSpace = Titanium.UI.createButton ({ systemButton : Titanium.UI.iPhone.SystemButton.FLEXIBLE_SPACE }); var textfield = Titanium.UI.createTextField ({ borderStyle : Titanium.UI.INPUT_BORDERSTYLE_ROUNDED, hintMessage: 'Text Message', width: 220 // keyboardToolbar : [cancel, flexSpace, camera, flexSpace,send_button], // keyboardToolbarColor : '#999', // keyboardToolbarHeight : 40, }); var toolbar = Titanium.UI.iOS.createToolbar ({ items:[camera, flexSpace, textfield, flexSpace , send], bottom:0, borderTop:true, borderBottom:false }) win1.add(toolbar);
Your Answer
Think you can help? Login to answer this question!