【发布时间】:2017-09-04 13:03:40
【问题描述】:
我找不到任何关于 Xamarin android 处理 SearchView 的文章。
下面的 searchView 将提供黑色背景和白色 textColor
1) 我需要将背景颜色设置为白色和 textColor 白色。
2) 如果用户决定不使用搜索,键盘不会消失。点击 searchView 后如何关闭键盘?
谢谢
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#ffffff"
android:orientation="vertical">
<SearchView
android:minWidth="25px"
android:minHeight="25px"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#ffffff"
android:id="@+id/sv" />
<ListView
android:minWidth="25px"
android:minHeight="25px"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:id="@+id/merchantListView" />
</LinearLayout>
【问题讨论】: