Skip to content

share element. from recyclerview to viewpager with two kinds of pictures

Notifications You must be signed in to change notification settings

clm2733227/ShareElement_from_Recyclerview_to_Viewpager

Repository files navigation

ShareElementDemo

总结
1、此处有两种图片资源,recylerview显示的为缩略,viewpager中显示的为详情图。
2、recyclerview跳转viewpager中,share element动画实现。图片框架Glide。
3、viewpager加载页面,先用缩略图drawable作为placeholder,实现模糊过渡,再显示大图的效果。
4、开始过渡动画前,必须确保viewpager中的页面已经加载完成,否则会造成动画跳动。
5、关闭页面前,需要始终保证viewpager中有且仅有一个数据设置有share element name,如果有多个的话会造成图片错位。

summary
1.There are two kinds of pictures in this demo.Recyclerview shows the thumbnail and the viewpager shows the original pictures.
2.use Glide 4.0.0 as pictures loader.
3.when loading the viewpager pictures, use the thumbnail already loaded in recyclerview as the placeholder,and then shows the original picture.
4.Before the animation begins, make sure that the viewpager imageview has already layout completed, or it will frame skip.
5.Before finishing the viewpager activity,make sure there is only one imageview had set the share element name,or it will occur pictures malposition.



image

About

share element. from recyclerview to viewpager with two kinds of pictures

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages