2014-02-13 27 views
0

我在位于操作栏下方的活动顶部使用了searchview,问题在于这些建议显示在搜索视图上,因此用户无法看到键入的文本搜索查看建议显示在小部件上

<?xml version="1.0" encoding="utf-8"?> 
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" 
android:layout_width="match_parent" 
android:layout_height="match_parent" 
android:orientation="vertical" > 

<android.support.v7.widget.SearchView 
     android:id="@+id/fragment_map.searchView" 
     android:layout_width="match_parent" 
     android:layout_height="wrap_content">  
</android.support.v7.widget.SearchView> 

<RelativeLayout 
    android:layout_below="@id/fragment_map.searchView" 
    android:layout_width="match_parent" 
    android:layout_height="match_parent" 
    android:id="@+id/map_container"> 

    <!-- The map fragments will go here --> 
</RelativeLayout> 
    </RelativeLayout> 
+0

固定通过添加此视图到的RelativeLayout的底部,并把它设置到锚固<查看 机器人固定:id =“@ + id/fragment_map.dropDownAnchor” 机器人:layout_below = “@ ID/fragment_map.searchView” 的android:layout_width = “match_parent” \t \t机器人:layout_height = “0dp” /> – user1447209

+0

如果您的问题已得到修复,然后张贴此为答案,就可以接受它 –

回答

0

通过添加此视图到的RelativeLayout的底部,并把它设置到锚固

<View android:id="@+id/fragment_map.dropDownAnchor"  android:layout_below="@id/fragment_map.searchView" android:layout_width="match_parent" android:layout_height="0dp" />