android - Shared Element Transition to ImageView works on exit, not smooth on enter -
as can see video when image clicked in recyclerview
not smooth when transitioning new activity. when click go original activity transition smooth. how can make transition smooth when opening activity?
here's code launching activity
intent myintent = new intent(getactivity(), wallpaperfullactivity.class); view sharedview = v.findviewbyid(r.id.wall_image); string transitionname = "wall_trans"; activityoptionscompat transitionactivityoptions = activityoptionscompat.makescenetransitionanimation(getactivity(), sharedview, transitionname); myintent.putextra(wallpaperfullactivity.bundle_tag, mdatawalls.get(i)); activitycompat.startactivity(getactivity(), myintent, transitionactivityoptions.tobundle());
seeing names of variables, guess transitioning imageview high resolution image. problem might be, loading of image takes time , final position , size of imageview not known @ time of transitioning, making transition jerky. consider postponining transition activity.postponeentertransition()
, start activity.startpostponedentertransition()
when image loaded. more information, see this blog entry.
Comments
Post a Comment