I have an activity that contain a listview. My listview has many pictures. When user touch a picture, second activity start with shared element transition. Second activity contains viewerpager that shows pictures in first activity. I want when user press back after change current picture, return transition back to current picture item with animation. By default sample of shared element transition,when user press back return transition animation back to first item that user touch it.
Asked
Active
Viewed 424 times
2 Answers
0
try use listView.setSelection(position)
in onResume method
Or for smooth scroll listView.smoothScrollToPosition(position);

Tim
- 92
- 7
-
I don't want select that item, i only want animation end in that item. Some like media viewer in telegram. – No Body Jun 15 '16 at 09:43
-
No, please wait i describe my problem in picture. – No Body Jun 15 '16 at 09:52
0
Check this sample project: https://github.com/alexjlockwood/activity-transitions
The key point: you have to tell activity 1 a new position of shared element.

sdex
- 3,169
- 15
- 28