我需要将写在 SearchView
内部的提示文本进行包装。我该如何实现?
使用下面的代码,文本显示为:"This is a very lo..."
这是我的 SearchView
:
<SearchView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/sv"
android:queryHint="This is a very long searchview hint"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true" />
编辑
我能够通过编程方式完成这个操作:
int id = mSvBusqueda.getContext().getResources().getIdentifier("android:id/search_src_text", null, null);
EditText editText = (EditText) mSvBusqueda.findViewById(id);
editText.setSingleLine(false);
但是我无法让搜索视图容器包裹编辑文本(见图片)