android - MaterialSearchView 不显示重新发送列表
问题描述
我使用MaterialSearchView。这是我的布局。我也使用导航组件。从 toolBar mainActivity 必须在 Fragments 中显示 MaterialSearchView
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<androidx.appcompat.widget.Toolbar
android:id="@+id/appBarLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:title="@null">
<com.miguelcatalan.materialsearchview.MaterialSearchView
android:id="@+id/search_view"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
</androidx.appcompat.widget.Toolbar>
<androidx.fragment.app.FragmentContainerView
android:id="@+id/myNavHostFragment"
android:name="androidx.navigation.fragment.NavHostFragment"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:defaultNavHost="true"
app:navGraph="@navigation/navigation" />
</LinearLayout>
当我在搜索中写入时,重新发送列表显示如下:
解决方案
推荐阅读
- unit-testing - 单元测试机器人框架
- java - 底部选项卡更改片段
- php - Wordpress 上传大小减少到 20MB 以下,即使它说限制是 505MB - 发生在过去 24 小时内
- r - 使用 Chrome Web 驱动程序在 RSelenium 中设置代理
- git - 根上的 Git 子树
- c# - 在 C# 中更新数组中的多个对象
- sql - SQL:使用 BULK 语句加载 CSV 文件会导致希伯来语字符串出现问题
- html - SVG 不适合父容器,preserveAspectRatio 不能按预期工作
- java - 字符串“匹配”似乎在 JSR223 断言中不起作用
- symfony - 从 3.4 升级到 4:Symfony 4.0 中的参数名称将区分大小写