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

Animate layout changes when switching between week view mode and month view mode #278

Closed
chuks opened this issue May 4, 2016 · 6 comments

Comments

@chuks
Copy link

chuks commented May 4, 2016

Hi,
This is an absolutely fabulous library! One question --is there a way to animate the mode switching from week mode to month mode, and vice versa? Right now, it just collapses and expands, and for an application I'm working on, it's too much of a jump. I would like to mimic the Google Calendar's layout animation when switching between modes.

@ekchang
Copy link
Contributor

ekchang commented May 5, 2016

The transition does seem jarring. We'll look into it!

@chuks
Copy link
Author

chuks commented May 5, 2016

@ekchang Will be much appreciated!

@ekchang
Copy link
Contributor

ekchang commented May 10, 2016

Having looked into it, the best way to accomplish this is by setting android:animateLayoutChanges="true" on your parent layout and setting LayoutTransition#enableTransitionType(CHANGING) on the parent as well.

I played around with adding it to the library but decided against it--mainly, it may have undesirable side effects because now MCV impacts its parent (and thus any siblings who you may not want to animate will now animate their changes).

Closing--feel free to submit a PR or comment if manually setting the transition on your parent isn't sufficient. Thanks!

@soujanyamandala
Copy link

I couldn't get it working by setting animation on parent Layout

@chuks
Copy link
Author

chuks commented Oct 15, 2017

Couldn't either

@soujanyamandala
Copy link

soujanyamandala commented Oct 15, 2017

I want to add swipe up and down on material calendar view so that swipe down gives month view and swipe up gives week view, the library already has viewpager set for scrolling right and left. Is there any way I can add swipe up and down too? When I add swipe up and down, scrolling doesn't work.

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

No branches or pull requests

3 participants