SearchView 显示框位置问题

来源:互联网 发布:.win域名 编辑:程序博客网 时间:2024/05/16 11:08

利用SearchView 进行查询listview里面时候,会出现如下问题


显示框出现的位置不合适。此时的布局文件代码如下

  <SearchView        android:id="@+id/sv"        android:layout_width="match_parent"        android:layout_height="wrap_content" />    <ListView        android:id="@+id/lv"        android:layout_width="match_parent"      <pre name="code" class="html">       android:layout_height="wrap_content"<span style="font-family: Arial, Helvetica, sans-serif;">/></span>

只需要把布局文件中listview 的布局改为

<strong> android:layout_height="match_parent"</strong>


2 0
原创粉丝点击