LightSDK.native.headSetSearchView

功能描述

通过js设置导航栏搜索视图

支持格式

Json

请求参数:

字段 可选 类型及范围 说明
icon string 搜索框图标的文件名,native/res/icon目录下的本地文件,相对路径且不包括文件后缀,如使用图片native/res/icon/test.png, 则次此参数为test
backgroundColor string 搜索框背景颜色,格式为 #ffffff,默认为白色
placeholderText string 搜索框文字,默认为空
type string 搜索框的输入类型,若type为input则为可以输入文字,否则只执行touch 跳转事件
placeholderTextColor string 搜索框文字颜色,格式为 #ffffff,默认灰色

请求调用示例

params={
"icon":"setting",
"backgroundColor":"#123456",
"placeholderText":"搜索",
"placeholderTextColor":"#123456",
}

LightSDK.native.headSetSearchView(params,cb);

返回字段示例

{
"info": {
"error_code": "0",
"error_message": "success"
},
"data": {
"status": "click","result":"success"
}
}

返回值说明

字段名 字段类型 说明
result string 搜索框的返回值,当type为input时,则返回输入框的文字,否则返回success
status string 搜索按钮是否被点击,click表示被点击