本文介绍了如何实现类似材料设计SearchView的WhatsApp?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

WhatsApp具有这样的工具栏:

WhatsApp has such Toolbar:

单击搜索"菜单项时,从顶部的SearchView向下将占据工具栏的整个空间:

When 'Search' menu item clicked, from the top SearchView comes down which takes whole space of toolbar:

当我尝试实现SearchView时,它看起来像这样:

When I tried to implement SearchView, it looks like this:

我找到了一些实现此目的的库: Eugene Horan的Android Material SearchView 由krishnakapil制作的材料搜索视图.但是它们与WhatsApp中的情况不同.

I found some libraries to implement this:Android Material SearchView by Eugene Horanand MaterialSearchView by krishnakapil. But they are not like in WhatsApp.

这个问题似乎很奇怪,我找不到方法.所以我的问题是如何实现像顶部的材料设计SearchView这样的WhatsApp?

This question may seem weird, I could not find the way how to do this. So my question is how to implement WhatsApp like material design SearchView which comes from the top?

推荐答案

我开发了一个深受社区欢迎的库.

I have developed a well received library by the comunity.

您在寻找什么吗?

尝试一下,看看是否适合您.

Give it a try and tell if if was usufull for you.

这是 MaterialSearchView 的Github存储库.

Here it is the Github repo for MaterialSearchView.

这篇关于如何实现类似材料设计SearchView的WhatsApp?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-12 23:58