创建自定义下拉列表

发布于 2025-01-12 12:53:10 字数 342 浏览 2 评论 0原文

只是想知道我怎样才能创建这样的东西或者Android已经有这个组件了。

我将使用 android xml 布局

在此处输入图像描述

当用户开始输入搜索内容时,将显示此下拉列表。

我有几个想法。 我可以创建一个可以从搜索栏下方顶部打开的 BottomSheet 吗? 创建一个在搜索栏下方打开的对话框片段。 创建一些自定义下拉列表。

非常感谢您的任何建议。

Just wondering how can I create something like this or does Android have this component already.

I will be using android xml layouts

enter image description here

When the user starts to type in the search this will show this dropdown list.

I have a few ideas.
Could I create a bottomSheet that can open from the top below the search bar.
Create a dialog fragment that opens below the search bar.
Create some custom dropdown list.

Many thanks for any suggestions.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文