No color property for searchbar in titanium

帅比萌擦擦* 提交于 2020-01-25 00:33:26

问题


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:


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



来源:https://stackoverflow.com/questions/34264016/no-color-property-for-searchbar-in-titanium

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!