简体   繁体   English

如何在Android中的布局中实现Searchview

[英]How to implement Searchview in the layout in Android

I am trying to implement a searchView in the layout file just like other Views rather than on toolbar. 我正在尝试像其他视图一样在布局文件中而不是在工具栏上实现searchView。 Before I was using AutoCompleteTextView but now I wanted to implement SearchView. 在使用AutoCompleteTextView之前,但现在我想实现SearchView。 If anyone knows please help. 如果有人知道,请帮助。

Click here for the Image 点击这里查看图片

Thanks in advance. 提前致谢。

Well there are lot of examples you can find. 好了,您可以找到很多示例。 The best solution provided here: 此处提供的最佳解决方案:

Creating a SearchView that looks like the material design guidelines 创建看起来像材料设计准则的SearchView

Also there are libraries available,the easiest library to implement is 也有可用的库,最容易实现的库是

https://github.com/Quinny898/PersistentSearch https://github.com/Quinny898/PersistentSearch

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM