Reputation: 77
I am using collapsing toolbar. Is it somehow possible to achieve behavior, that will change multiple views in collapsing toolbar according to scrolling? For example I have three RelativeLayouts
next to each other consisting of an ImageView
(centered in parent) and text (below image) in collapsing toolbar. I want it for example to move image to left top, to move text to end of image and resize its height.
This wireframe shows a little what I would like to achieve:
Upvotes: 3
Views: 1180
Reputation: 1091
Try use CollapsingToolbarLayout in the AppBarLayout.
Put big views to the CoollapingToolbarLayout. And Small views in the Toolbar.
You can try play with flag: app:layout_scrollFlags="scroll|exitUntilCollapsed|snap"
If you want create rely cool animation for text in the text view. You must implement all behavior in Java code.
Upvotes: 3