dougblack / nextbus

GT NextBus - An Android app
17 stars 6 forks source link

How to handle all the intents? #3

Closed darkzeroman closed 11 years ago

darkzeroman commented 11 years ago

Let's use an example.

Say a user goes to Trolley Route -> Transit Hub -> Pauses here to notice the times and then wants to check other routes -> Other Arrivals -> Blue Route -> Other Arrivals -> Red Route.

So at this point, the stack of activities will be.

- StopView Activity with: Red Route at Transit Hub
- StopView Activity with: Blue Route at Transit Hub
- StopView Activity with: Trolley Route at Transit Hub
- StopList Activity with: Trolley Route with To Transit Hub Direction
- Route Picker Activity

And the user will have to press "BACK" many times to return to the Route Picker Activity. Is that okay?

Or should it be that only one StopView Activity exists ever. So in that case when the user presses "BACK" he will not have to go through all the StopView Activities.

So it would look like the following when the user starts viewing the Trolley stops:

- StopView Activity with: Trolley Route at Transit Hub
- StopList Activity with: Trolley Route with To Transit Hub Direction
- Route Picker Activity

and then the user chooses to view Blue Route at the Transit Hub

- StopView Activity with: Blue Route at Transit Hub
- StopList Activity with: Trolley Route with To Transit Hub Direction
- Route Picker Activity

etc.

Thoughts?

dougblack commented 11 years ago

I agree we should only have one instance of StopView Activity at a time.

The largest Activity stack possible should be:

RoutePicker -> StopList -> StopView

So if a user closes any StopView activity the new stack should always be:

RoutePicker -> StopList