Skip to content

Instantly share code, notes, and snippets.

@rakhimoni
Last active January 13, 2016 08:42
Show Gist options
  • Save rakhimoni/584ffa37958450123c31 to your computer and use it in GitHub Desktop.
Save rakhimoni/584ffa37958450123c31 to your computer and use it in GitHub Desktop.
customized search bar using Titanium
var win = Ti.UI.createWindow({
top : 20,
backgroundColor:"white",
});
var searchHolder = Ti.UI.createView({
height : 55,
width : '100%',
top : 45,
backgroundColor:"pink",
layout : 'horizontal'
});
//search bar
var serLocation = Ti.UI.createSearchBar({
height:55,
top:0,
showCancel:false,
width:'85%',
});
//Calendar button
var calButton = Ti.UI.createButton({
height : 45,
width : 45,
backgroundImage:"button_cancel.png"
});
searchHolder.add(serLocation);
searchHolder.add(calButton );
win.add(searchHolder);
win.open();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment