terranlune / SFSweep

0 stars 0 forks source link

Switch between modes #10

Closed terranlune closed 10 years ago

terranlune commented 10 years ago

The main map view should have a way (maybe a spinner for now) to switch between how to pick or color the lines drawn on the map. Selecting a new mode should cause the lines to redraw.

terranlune commented 10 years ago

Hey Mimi, here's the task we were talking about tonight. Here were the three main parts: 1) Add a spinner to the UI somewhere, with the following hard-coded options: Heatmap, Sunday, Monday, Tuesday, Wednesday, Thursday, Friday, Saturday 2) When someone selects an entry in the spinner, the mode should change and be saved 3) The lines should be redrawn bonus) When the app is opened again later, the saved mode should be restored

I just implemented the weekday mode (issue #11) and so there's now a pretty straightforward way to do part 3. In the MapActivity, there's now a "mapAdapter" member variable, and it has methods "setModeHeatmap()" and "setModeWeekday(Str)". Check out this commit for my actual code changes, plus an example: https://github.com/terranlune/SFSweep/commit/724b87c1a93cc0f24631472a97159f39ffdd26e7

One thing to note, the weekday string you should pass to "setModeWeekday" should be the 3 letter form (Eg. "Fri") with the only exception being Tuesday which should be "Tues". (I dunno why, the input data is weird...)