简体   繁体   English

如何使 searchview 提示图标显示在查询上?

[英]how to make searchview hint icon shown on query written?

There is a hint searchicon which appears when searchview edittext opens at the start of it like this image I want to show this hint icon on searchview query currently when I query something this icon hides like this当 searchview edittext 在它的开头打开时,会出现一个提示 searchicon,就像这张图片我想在 searchview 查询中显示这个提示图标,当我查询这个图标隐藏的东西时,这个图标隐藏起来像这样

Is there anyway to do that?有没有办法做到这一点?

Make sure, the follow property is set to true.请确保,follow 属性设置为 true。 It depicts the default state of the SearchView.它描述了 SearchView 的默认 state。 If true, it will be iconified when not in use and expanded when clicked.如果为真,它会在不使用时图标化,并在单击时展开。

app:iconifiedByDefault="true"

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

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