46
12
u/SailorSeashell Mar 07 '20
Are using MotionLayout as the view for a recyclerview item? I tried to do that recently but I think I had issues with the items being a fixed size... how are you achieving this?
2
u/mrea1 Mar 08 '20 edited Mar 08 '20
I’ve had a lot of issues using MotionLayout in normal layouts. It controls every view in the layout currently.
So views that I want to stay static and visible might be hidden unless I add every single view in the motion scene file with visibilityMode=ignore. For large/complex layouts, that is so tedious. If you forget to add it to the motion scene file, there’s no warning or anything. MotionLayout will just hide it. Debugging that is a real pita.
Curious if you ran into these issues at all? It looks like your MotionLayout is pretty high up in the hierarchy, so it has lots of views as children
Maybe I’m using MotionLayout incorrectly? I thought the idea was for it to be a ConstraintLayout with additional capabilities to animate some views (not all views). Pretty sure it worked that way in alpha - by default it wouldn’t touch your view unless you told it to
2
u/smithshelke Mar 08 '20
You're absolutely right mrea1, working with motionLayout was a real pain in the ass, the more complex it gets, something breaks and its really frustating as debugging it is hard. I had read the tweet by John hoford about the visibilityMode so that did not take took too long to fix. There is still so much stuff I want to do but it all breaks when I try it, So I'll make the repo public soon, so that maybe you guys can help me out. 😁
5
u/jekaleaad Mar 07 '20
How do you handle fitting the content of the detail page on smaller screens? I think you have to have a scrollView in there but in my experience with motionLayout compatibility is very poor.
5
u/chertycherty Android Engineer Mar 07 '20
MotionLayout sure is powerful but this is way too busy for my liking, maybe if it was a bit quicker
5
5
u/lnkprk114 Mar 07 '20
This looks fantastic, but I'm always a little guarded now when I see swanky animations without real data. Like, the test apps all seem to work well but once you actually need to tie it in with real data - images that are loading, text that's arbitrary sizes, loading on the next page etc everything seems to come crashing down.
1
u/Mavamaarten Mar 09 '20
The MotionLayout is extremely powerful. But I don't understand one thing: this all works great if you hardcode x-amount of items in your layout. How do you make this work with real data that you fetch from somewhere? Like, a recyclerview?
11
6
u/d00nutb00y Mar 07 '20
Reminds me of Spotify. What library did you use?
23
u/cuberob Mar 07 '20
Stuff like this can be done with MotionLayout which is part of the jetpack/androidX libraries (see ConstraintLayout)
2
2
u/bernaferrari Mar 07 '20
My dream is to see stuff like this working with swift/flutter/react/etc. There is nothing better than motion layout at this moment.
0
Mar 07 '20
[deleted]
1
u/bernaferrari Mar 08 '20
I know a lot of flutter and the bad side is animation, unfortunately. It is a lot harder than swiftui is and compose will be. A simple iOS multi-selector recreation has ~800 LOC. And there is no preview. So it is a lot more like making android view animations which are a nightmare.
4
u/Abhi_05 Mar 07 '20
Bro I've been looking for something exactly like this. Can you please share this on a git repo?
3
3
u/badvok666 Mar 07 '20
Looks great but isn't that detail view breaking a few material guide lines? Mainly the picture card should be the same level as the sheet pulled up. And the grey card behind feels like fluff.
1
Mar 07 '20
I think you can put images in the grey cards and flick through them. Seems like that's what it affords, at least.
1
1
1
u/mainmeal5 Mar 07 '20
Imo as a user, horizontal designs with very little or not even a full title to see on each side is really claustrophobic and unintuitive. Theres definitely such a thing as too much information cluttering or feeding your brain too much, but feeding it too little, you lose all awareness and feels like looking through binoculars. Android pie with recents being horizontal is the worst idea ever too
1
u/FrezoreR Mar 07 '20
Looks great but it would be nice if the transition was a bit faster as it makes the app feel a little sluggish.
1
1
1
u/zetabyte00 Mar 08 '20
Congrats! Very well done!!! You could put this code in some git repo for us to study it.
1
1
1
0
u/AntiNeutrino97 Mar 07 '20
RemindMe! 2 days
2
u/RemindMeBot Mar 07 '20 edited Mar 09 '20
I will be messaging you in 7 hours on 2020-03-09 08:04:15 UTC to remind you of this link
22 OTHERS CLICKED THIS LINK to send a PM to also be reminded and to reduce spam.
Parent commenter can delete this message to hide from others.
Info Custom Your Reminders Feedback
0
0
0
0
0
0
-7
u/CraZy_LegenD Android janitor Mar 07 '20
Everybody wants the repo/source code, go and sweat your fingers, well done OP.
This comment will be heavily down voted but do not leech!
7
0
0
0
0
0
Mar 09 '20
[deleted]
1
u/RemindMeBot Mar 09 '20
I will be messaging you in 3 days on 2020-03-12 11:44:32 UTC to remind you of this link
CLICK THIS LINK to send a PM to also be reminded and to reduce spam.
Parent commenter can delete this message to hide from others.
Info Custom Your Reminders Feedback
0
Mar 14 '20
[deleted]
1
u/RemindMeBot Mar 14 '20
I will be messaging you in 3 days on 2020-03-17 21:34:06 UTC to remind you of this link
CLICK THIS LINK to send a PM to also be reminded and to reduce spam.
Parent commenter can delete this message to hide from others.
Info Custom Your Reminders Feedback
13
u/smithshelke Mar 07 '20
I'll be making the repo public after a few days.. Since I wanted to just experiment motionlayout the code isn't the best. I will try to make it easy to understand.. Thanks for the upvotes guys!