Closed murraycu closed 9 years ago
Also, the transition from the list view (when clicking on already-classified items) doesn't come from the right place either.
This seems to work correctly now. The trick was to use changeBounds as well as changeImageTransform: https://github.com/murraycu/android-galaxyzoo/commit/e5962528ffdf0cb3bb9259874a5efc9a3d2aebbb
Opening already-classified item from the list view shows a nice move+expand animation as the large version of the image is shown in the new activity.
However, the same thing doesn't work when opening an example image from the help activity(QuestionHelpActivity/QuestionHelpFragment). For instance, click on the ? action icon and then click on an image thumbnail.
This should work:
Both the thumbnail and the larger image are marked with the same transitionName: https://github.com/murraycu/android-galaxyzoo/blob/master/app/src/main/java/com/murrayc/galaxyzoo/app/QuestionHelpFragment.java#L153 and https://github.com/murraycu/android-galaxyzoo/blob/master/app/src/main/res/layout/fragment_example_viewer.xml#L23
and the ExampleViewerActivity is started with the appropriate transition options bundle: https://github.com/murraycu/android-galaxyzoo/blob/master/app/src/main/java/com/murrayc/galaxyzoo/app/QuestionHelpFragment.java#L194
and the transitions are specified in the theme: https://github.com/murraycu/android-galaxyzoo/blob/master/app/src/main/res/values-v21/styles.xml#L15 which refers to this: https://github.com/murraycu/android-galaxyzoo/blob/master/app/src/main/res/transition/change_image_transform.xml