图片描述
美团这种复杂的筛选条件怎么实现。
需要上拉下拉刷新,
筛选条件需要可以停靠。
3.点击条件,条件需要滑动到顶部停靠。(这里需要注意如果listview 除掉顶部和筛选条件只有二个item,筛选条件怎么滑动到顶部?)
4.筛选条件弹出的内容不需要管。请区别此问题与网路上其他的美团筛选,他们那个比较简单,没啥意思。
大家讲道理2017-04-18 09:09:39
First of all, Meituan did not give me a way to slide to the top and then expand the search bar, but instead, immediately display the search bar at the top and expand the content.
I have done this in a company project, and my implementation is like this:
The entire page is RecyclerView nested in NestScrollview
The search bar is at the top (true) and in the list (false). The fake search bar is just the same in appearance as the real search bar. When the fake search bar is clicked, the page scrolls up搜索条距离顶部的长度
, and the scroll ends at the fake search bar ( The scrolling time of Scrollview's SmoothScrollTO() is usually 250 milliseconds) before the real search bar is displayed, and finally the content is expanded.
This process is broken down, each part is in order, and the overall look is relatively smooth and natural. Meituan’s is actually not very effective. Personally, I think it’s just from the UI perspective.