是否可以在 android 搜索建议中添加特殊行?
我将搜索对话框(快速搜索框)添加到我的活动中,它显示来自我的 sqlite 数据库的建议。这非常有效。
我想在建议 ListView 的顶部添加一个特殊行,以提供启动远程搜索的可能性。例如,我想要一行“从互联网搜索地址”,这将打开另一个活动。
有那么一天吗?
多谢
I added the Search Dialog (Quick Search Box) to my activity, which shows suggestions from my sqlite database. This works very well.
I would like to add a special row at the top of the suggestions ListView to offer the possibility to launch a remote search. For example, I would like to have a row "Search an address from Internet" which will open an other Activity.
Is there a day to do that ?
Thanks a lot
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您需要专门化您的适配器
这里有一些好的建议
Android:自定义分隔符(或ListView 中的甚至 item) 取决于 item 的内容
只需返回第一个视图作为您想要的视图。
You need to specialize your adapter
Here are some good pointers
Android: custom separator (or even item) in ListView depening on content of item
just have to return the first view as view you want.