我有一個搜索視圖,我有一個查詢提示屬性。但是隻有在點擊搜索視圖後纔會顯示提示。有沒有辦法讓它在被點擊之前出現?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