No color property for searchbar in titanium

2019-08-05 09:04发布

enter image description here

i am creating a searchbar in titanium 4.1.0 sdk application,where i need to hide blue color bottom line in seaarchbar and make the color of typing letters blue color.i am using below code but there are no property called color in searchbar and how could i hide bottom line ?Please guide me in this.

var search = Titanium.UI.createSearchBar({
height : 23,
backgroundColor:'transparent',
showCancel : true,
top : 0,
softKeyboardOnFocus : Titanium.UI.Android.SOFT_KEYBOARD_HIDE_ON_FOCUS
});

var tableview = Titanium.UI.createTableView({
backgroundColor : 'transparent',
height : 'auto',
contentHeight : 'auto',
left : 10,
right :10,
search : search
});

1条回答
狗以群分
2楼-- · 2019-08-05 09:41

First of all, for Android it's suggested to use SearchView instead since that maps to a native component on Android instead of emulating the one from iOS.

If that gives you the same result, you will have to use a custom Android theme to override the style:

Styling a SearchView in Android Action Bar

查看更多
登录 后发表回答