SearchView is invisible with collapseActionView parameter since 24.1 design library

别等时光非礼了梦想. 提交于 2019-12-04 23:39:42

问题


I encountered a problem since I updated the Android Design Library from 23.4.0 to 24.1.1

My SearchView was defined like this :

<item android:id="@+id/action_search"
    android:icon="@drawable/ic_search"
    android:title="@string/title_action_search"
    app:actionViewClass="android.support.v7.widget.SearchView"
    app:showAsAction="collapseActionView|ifRoom"
    />

But my SearchView input became invisible (I can write in it, but the text, or hint does not appear).

I described it in the following picture with 3 different steps :

If I remove the "collapseActionView" parameter, it works fine, but the searchInput is only half of the screen (instead of full width).

Do you know if there was a change in this library which could explains it ?

Thanks by advance ! (And sorry for the image quality...)

来源:https://stackoverflow.com/questions/38583430/searchview-is-invisible-with-collapseactionview-parameter-since-24-1-design-libr

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!