Add Transit Center View for user-created stop groups#1517
Open
diveshpatil9104 wants to merge 1 commit into
Open
Add Transit Center View for user-created stop groups#1517diveshpatil9104 wants to merge 1 commit into
diveshpatil9104 wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #1221
Problem
Users who transfer at transit hubs (e.g., Bellevue Transit Center) have to star individual stops and scroll through a flat list to compare arrival times. There is no way to group related stops together.
Solution
Adds a "Transit centers" feature that lets users create named groups of stops, accessible from the navigation drawer. Users can:
Tapping a stop opens the existing
ArrivalsListActivity— no new arrivals UI needed.Demo
center.mp4
Implementation
Database (v33 → v34):
transit_centerstable — stores group name + region IDtransit_center_stopsjoin table — maps groups to stop IDs++oldVersionmigration so all upgrade paths workUI:
TransitCentersFragment— CursorLoader + ContentObserver list of groupsTransitCenterDetailFragment— two-step query (get stop IDs, then query Stops with IN clause)AddStopToTransitCenterDialog— multi-choice picker for starred stopsTransitCenterDetailActivity— hosts detail fragment, usesUIUtils.setupActionBar()+android.R.id.contentpatternNavigation:
NAVDRAWER_ITEM_TRANSIT_CENTERSin drawer (between Starred Routes and My Reminders)HomeActivitymatching existing nav itemsNew files (7)
TransitCentersFragment.javaTransitCenterDetailActivity.javaTransitCenterDetailFragment.javaAddStopToTransitCenterDialog.javatransit_center_list_item.xmltransit_centers_options.xmltransit_center_detail_options.xmlModified files (6)
ObaContract.javaObaProvider.javaNavigationDrawerFragment.javaHomeActivity.javaAndroidManifest.xmlstrings.xmlTest plan