移动 ViewPager 变详情页 ZoomHeader

码农软件 · 软件分类 · Android UI 组件 · 2019-04-24 07:29:17

软件介绍

模仿饿了么详情页可以跟随手指移动 ViewPager 变详情页的效果。

饿了么实现效果和模仿效果

实现思路

使用 CoordinatorLayout+Behavior 实现。

ViewPager+头部

整个实现的思路是这样的。整体布局从上到下依次是:

  • 透明 View

  • ViewPager

  • RecyclerView

其中透明 View 和 Viewpager 合并成一个自定义的 Header。当这个 Header 上移的时候,图片放大,并且 RecyclerView 联动上衣,从透明转向并且不透明。

本文地址:https://codercto.com/soft/d/4258.html

Beautiful Code

Beautiful Code

Greg Wilson、Andy Oram / O'Reilly Media / 2007-7-6 / GBP 35.99

In this unique work, leading computer scientists discuss how they found unusual, carefully designed solutions to difficult problems. This book lets the reader look over the shoulder of major coding an......一起来看看 《Beautiful Code》 这本书的介绍吧!

HTML 编码/解码
HTML 编码/解码

HTML 编码/解码

URL 编码/解码
URL 编码/解码

URL 编码/解码

RGB CMYK 转换工具
RGB CMYK 转换工具

RGB CMYK 互转工具