I have a TextView
in my activity A. How can I make shared element transition of TextView
from activity A and a title of CollapsingToolbarLayout.setTitle()
from activity B?
Is there way to obtain its title view id
from CollapsingToolbarLayout
's source code?
Thanks for help!
I've had similar issue. My app had CollapsingToolbar which had image in it and I wanted to share the image which was going from normal ListView into the CollapsingToolbar.
You need to create a custom TextView and use it as a replacement of the actual title in CollapsingToolbar. Also need to set the actual title to empty string so it looks hidden.
You should look into this answer where its shown how to use custom view in CollapsingToolbar with the listener which is needed to replicate animations of normal title. It may not look identical but I can't think of better idea. Hope it was helpful.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With