我有一个搜索视图,我有一个查询提示属性。但是只有在点击搜索视图后才会显示提示。有没有办法让它在被点击之前出现?SearchView查询提示之前单击它
<SearchView
android:id="@+id/searchView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentEnd="true"
android:layout_alignParentStart="true"
android:layout_below="@+id/textView4"
android:layout_marginBottom="14dp"
android:layout_marginTop="30dp"
android:queryHint="Search" />
我已经看到了类似的查询另一个SO问题,但它并没有解决。这就是为什么我再次问。
因为它处于“iconified”状态 – Selvin
在这里我的解决方案:https://stackoverflow.com/questions/46681500/android-4-3-not-focus-searchview-not-show-hint?noredirect= 1#comment80355499_46681500 – Alex