Android: How to change views in collapsing toolbar when scrolling - android

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:

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.

Related

How to set text in recyclerview to the center with animation?

I have a recyclerview with expandable elements. When it expands I would like to have the text to align center-horizontally. I have tried to setGravity, but it is in ConstraintLayout and maybe because of that, it doesn't work.
Additionally, is it possible to add during this process with any fancy animation?

Auto Resize a frame layout with children on recyclerview scroll

In my app i'm having a framelayout with many children like textviews and imageview here i want a collapsing toolbar like effect however i am unable to decide how can i achieve that while also auto resizing the children as per the scroll i already tried using a collapsing toolbar but the size of children wasn't adjusted properly as per scroll:
Here is what i'm trying to achieve:
https://www.youtube.com/watch?v=vBnrQEyGNfk
and guide or suggestions in this will be really appreciated!

Is it possible to have a layout be parallax in android?

I know how to use the CoordinatorLayout with CollapsingToolbarLayout to make it so that the toolbar and an imageview behaves as parallax but is there a way to make it so that an entire layout behaves as a parallax? or an imageview is the image that is pinned?
I'm trying to make it so that the toolbar in the background does not collapse completely the contents still scroll over the layout if that makes sense.

CoordinatorLayout custom behavior at right of Toolbar with AppBarLayout

Based on this tutorial, https://github.com/saulmm/CoordinatorBehaviorExample,I am trying to create an application which have a circle image that scrolls up to the Right of Toolbar and when scrolling down goes to the middle of the expanded AppBarLayout.
How to make it move to right of Toolbar with above mentiond behaviour and animation.
AppBarTranslateScaleBehavior will help you achieve such a behavior.

How To Make An Edit Text Float on top of toolbar and Main Layout

I want to achieve this kind of design
As you can see the Edit text performs a nice animation to translate from the middle of the screen to the Top of the layout but i would like to know how achieve this.
I was thinking about wrapping the edit text inside a LinearLayout and when the Edit text reachs the Top the bacground just change to a gradient (white and yellow). Does that make sense??
I'd recommend using creating a fragment with CardView as parent and EditText as child and then animating it along with the background.
Check this site to get a head start to animating fragments http://cyrilmottier.com/2014/05/20/custom-animations-with-fragments/

Categories

Resources