Closed ghost closed 8 years ago
This sounds like something I could do (re: the tabs). Could I try working on this one? Would you want people to be able to swipe between the two tabs (i.e. use Swipe Views http://developer.android.com/design/patterns/swipe-views.html)?
Ah yes I would love that!! (Both the offer and the ability to swipe between the two tabs). Thank you so much :+1: Looking forward to it, no rush though :)
Ah by the way heads up, OTOH I'm not sure if the API returns the information of whether the dining location is a cafe or dining hall. I think one of them might. If this seems problematic let me know and I'll look more into it :+1:
Quick questions: would you prefer cafes to be on the left/first or dining halls to be on the left/first? Also would it make sense to remember which tab the user was last on and default to that, or just default to the first tab?
I would say dining halls on the left first and remember the last tab.
Yeah, I think dining halls are the slightly more common case of checking (because of changing menus), but remembering the last tab makes that choice less meaningful which is nice. So agreed with @TrevorEdwards . Open to thoughts on it of course though :+1:
One more quick question: What is the min SDK version and target SDK version? I don't see it in the manifest.
Ah yeah it's weird, so there are two build.gradle
files, one in the top level of the repo, and one here: https://github.com/genkimarshall/bigredapp-android/blob/master/app/build.gradle, which has the info you're looking for (I actually just updated it).
I'm not totally sure why there are two. My guess is java-specific and android-specific, but I'm not sure.
So anyway, yeah, min and target is 19 and 23 respectively.
Hm. As far as I can tell, the API doesn't actually tell you whether it's a cafe or a dining hall. How should I proceed?
Hmm, that's a bummer :/ Sorry for sending ya on a wild-goose-chase. Okay, I guess one not-ideal solution would be to hard-code the ids for the dining halls, because it is quite uncommon for new dining places to spring up, and if one does, it's most likely for it to be a cafe and not a dining hall (The dining halls are even less likely to change). But that's definitely not a good long-term solution, so I'll make a note to discuss this with Kevin, maybe tomorrow @ the Open Source Cornell meeting.
I would have just hard-coded some kind of association data for that. But definitely would be nicer if the API handled it for us.
New API has that info, I thought? Hopefully that gets pushed up soon.
Yeah, sorry I forgot, @lidavidm is right. New API does have it: https://github.com/mrkev/iroh/blob/master/open_status.coffee#L36 It is still being tested and all that but should be in production soon :+1:
@louisel Looks like we are transitioning to using the different server that has
the information now! http://tangerine-tious.rhcloud.com/dining/
So, first step would be to change the variable BASE_URL
in
DiningListFragment.java
to be http://tangerine-tious.rhcloud.com/dining/
.
Then, if you build and run the app, it will fail explaining there is a JSONException.
This is expected because our current code assumes the JSON at that endpoint is
a single array. So, from there, it would just be adding the tabs like you described
to put each sub-array in.
Think you still have time to do this at the moment?
Don't hesitate to ask any questions along the way :+1:.
Except, the number of cafes seems like it's less than it should be. E.g. what about Libe Cafe? Not sure what's going on there... But for now we can just move on with it.
@louisel Heads up, I pushed a fix so that the app correctly handles the new JSONObject response (instead of the JSONArray) from the new API. This is so I can publish this fix so the version on the Play Store is not broken xD. Feel free to work from there or we can just handle merging later.
Since we've switched over to using now.dining.cornell.edu in https://github.com/TrevorEdwards/bigredapp-android/commit/0c257165ef02dfd49bf0a12718b8a6dbd9246540 , this isn't really an option any more for dining unfortunately. Always open for discussion on this!
After discussing with @lidavidm and @TrevorEdwards, After the current efforts are settled, we want to have two tabs: Cafes, and Dining Halls. Within each one, currently-open places will be at the top in alphabetical order. Closed / almost open places will be after them in alphabetical order.