TrevorEdwards / bigredapp-android

Informational Android app for Cornell University.
https://play.google.com/store/apps/details?id=is.genki.bigredapp.android&hl=en
MIT License
14 stars 8 forks source link

Move menus into a separate activity #8

Closed lidavidm closed 9 years ago

lidavidm commented 9 years ago

This is a work-in-progress; best not to merge until we can clean up code style/etc.

TODO

IDEAS

device-2015-03-24-204416 device-2015-03-24-204432

lidavidm commented 9 years ago

Cornell has official color guidelines: https://brand.cornell.edu/color.php

lidavidm commented 9 years ago

device-2015-03-25-091855

Changes:

ghost commented 9 years ago

:+1: Awesome ^_^ Will get to pulling this down and going through it later tonight / as soon as I can make time.

lidavidm commented 9 years ago

So I have no idea how to get that slick transition to actually work while looking nice. But I've tried. I'll push what I have, and we can revert it if we can't get it to work. What I'm thinking is that the child activity just shouldn't use a toolbar - we should fake our own title. The only app I can think of that implements anything similar is the Google Calendar app.

http://gfycat.com/HotClumsyIslandwhistler

lidavidm commented 9 years ago

I gave up. It uses a scale animation now.

Gfycat: http://gfycat.com/CommonSoulfulIcterinewarbler

ghost commented 9 years ago

Re: the animations. I really wish I could play around with this stuff and see what I can do, but as you know Motorola refuses to give me 5.0. Yeesh. Re: menu of breakfast for tomorrow. Just double checked, RedAPI only supports getting the menu for a particular day (I assume it continues to get the day's menu until midnight, or something). I feel bad pressuring Kevin cause we kinda just sprung this project on him. So maybe it would be good to discuss getting our own version set up. Anyway, I have a PR going at your fork for some random minor stuff.

lidavidm commented 9 years ago

The scale animation here works for you right?

On Fri, Mar 27, 2015, 13:33 Genki Marshall notifications@github.com wrote:

Re: the animations. I really wish I could play around with this stuff and see what I can do, but as you know Motorola refuses to give me 5.0. Yeesh.

— Reply to this email directly or view it on GitHub https://github.com/genkimarshall/bigredapp-android/pull/8#issuecomment-87024726 .

ghost commented 9 years ago

One sec, I'll post a gif. It looks more like a minimal version of yours. Also, by the way, not sure why (something to do with me being on API 19 I'm sure), but my action bar has black text instead of white text, in both the DiningListFragment and the DiningListActivity: picture. Any ideas? I'll do some googling in a moment.

lidavidm commented 9 years ago

Yeah, I switched to the Toolbar instead of ActionBar because I thought it would help with the transition. Apparently not. I think I can still get it to work, but it'll take more work. Anyways, I haven't themed the toolbar yet, so if we stick with it we gotta fix that.

I recorded the gif with 5x slower animations, that's why.

On Fri, Mar 27, 2015, 13:56 Genki Marshall notifications@github.com wrote:

One sec, I'll post a gif. It looks more like a minimal version of yours. Also, by the way, not sure why [something to do with me being on API 19 I'm sure], but my action bar has black text instead of white text, in both the DiningListFragment and the DiningListActivity: picture https://dl.pushbulletusercontent.com/rimxU2RLRJ3455gWRyERdFFc00za9M6p/Screenshot_2015-03-27-13-46-55.png

— Reply to this email directly or view it on GitHub https://github.com/genkimarshall/bigredapp-android/pull/8#issuecomment-87034266 .

ghost commented 9 years ago

Ah okay. So, would it be better to just switch back to ActionBar then? I'm not well read on that stuff yet.

As for the animation, right ha I knew it was slowed, but ah didn't know it was that much. Anyway, looking more closely, the things that come for free in 5.0 (e.g. tap on row expanding to fill row, leading into animation) made it seem quite different at first, but yeah, it really is the same animation.

lidavidm commented 9 years ago

Yeah, I can revert that commit if we're going to give up on the shared element transition.

On Fri, Mar 27, 2015, 14:04 Genki Marshall notifications@github.com wrote:

Ah okay. So, would it be better to just switch back to ActionBar then? I'm not well read on that stuff yet.

As for the animation, right ha I knew it was slowed, but didn't know it was that much. Anyway, looking more closely, the things that come for free in 5.0 (e.g. tap on row expanding to fill row, leading into animation) made it seem more different, but it really is the same animation.

— Reply to this email directly or view it on GitHub https://github.com/genkimarshall/bigredapp-android/pull/8#issuecomment-87035769 .

ghost commented 9 years ago

Hmm, so the animation would be this one, where you would tap on the title and it would expand in size as it went to the Toolbar title?

lidavidm commented 9 years ago

That's what I want to achieve... No idea how to do it though. I think we have to have a separate TextView, use that as the shared element, and have it overlap with the toolbar as you scroll up or something, like how Play Music does it. We can get that done later though.

On Fri, Mar 27, 2015, 14:10 Genki Marshall notifications@github.com wrote:

Hmm, so the animation would be this one https://developer.android.com/design/material/videos/ContactsAnim.mp4, where you would tap on the title and it would expand in size as it went to the Toolbar title?

— Reply to this email directly or view it on GitHub https://github.com/genkimarshall/bigredapp-android/pull/8#issuecomment-87037155 .

ghost commented 9 years ago

Yeah okay. It definitely looks very nice ha. According to this it looks like I won't be able to see the effect on my device? But yeah, anyway, down to check out it out later too. edit: reading more carefully, actually seems it is possible with some custom animations for pre-lollipop, but yeah, that can come later.

lidavidm commented 9 years ago

Yeah, and that's complicated xD I think for now using the scale animation is fine. Not many will be using Lollipop anyways.

ghost commented 9 years ago

Haha yeah, agreed.

lidavidm commented 9 years ago

Alright, reverted to ActionBar instead of Toolbar. Any other changes you'd like?

lidavidm commented 9 years ago

http://stackoverflow.com/questions/19003671/how-to-get-a-reverse-animation-of-activityoptions-makescaleupanimation-when-fini suggests that Google Keep animates a fragment or view (presumably the fragment contains a Toolbar) instead of making the card a separate activity. Wouldn't be too bad to implement here, especially seeing as the logic of the new activity is mostly in the fragment. But that can wait.

lidavidm commented 9 years ago

See: http://developer.android.com/training/animation/zoom.html

ghost commented 9 years ago

Re: animations. Ah yeah that is cool, makes sense what they're doing there for Google Keep. Definitely yeah, we should keep that in mind. Re: ready PR. Besides the above line note, the only other things I'd like to bring up I have in my PR are here: https://github.com/lidavidm/bigredapp-android/pull/1 I'm totally open for other workflows, but I think doing this ^ style might work out nicely. Could I bother you to go through them?

lidavidm commented 9 years ago

Sure thing, just noticed the PR xD

ghost commented 9 years ago

Haha kk thanks ^_^

lidavidm commented 9 years ago

Alright, removed the null check and merged your changes.

ghost commented 9 years ago

Awesome :D