Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Transition name mislead #13

Open
mbarrben opened this issue Dec 1, 2014 · 2 comments
Open

Transition name mislead #13

mbarrben opened this issue Dec 1, 2014 · 2 comments

Comments

@mbarrben
Copy link

mbarrben commented Dec 1, 2014

It's confusing that you use EXTRA_IMAGE as an intent extra (https://github.com/antoniolg/MaterialEverywhere/blob/master/app/src/main/java/com/antonioleiva/materialeverywhere/DetailActivity.java#L74),
but also as a transition name between views (https://github.com/antoniolg/MaterialEverywhere/blob/master/app/src/main/java/com/antonioleiva/materialeverywhere/DetailActivity.java#L72).
More confusing is that the ImageView in DetailActivity has a transition name defined (https://github.com/antoniolg/MaterialEverywhere/blob/master/app/src/main/res/layout/activity_detail.xml#L32),
but later overridden with EXTRA_IMAGE (https://github.com/antoniolg/MaterialEverywhere/blob/master/app/src/main/java/com/antonioleiva/materialeverywhere/DetailActivity.java#L41).

It would be clearer if the transition name defined in the layout is the same that is used in ActivityOptionsCompat.makeSceneTransitionAnimation call. Then there's no need to call ViewCompat.setTransitionName. Even better, that transition name can be a string resource.

@chipcerio
Copy link

@mbarrben I agree with you. At first when I was looking at the source, it took me awhile to understand it until I checked other sources.

@sharathyadhav1
Copy link

error: Error: No resource found that matches the given name: attr
'android:windowAllowReturnTransitionOverlap'.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants