refactor(database): use Jetpack's Navigation Component #1252
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.
Part of #1217, this should implement the Navigation Component in our database quickstart.
Extra changes
In order to accommodate the Navigation implementation, some extra changes took place here:
NewPostTest
unit test class which was testing one of our activities that no longer exists.AppTheme.NoActionBar
theme because it was causing the systembar to disappear.fragment
package which contains the fragments used in aTabLayout
was renamed tolistfragments
to avoid any confusion.CommentViewHolder
out of thePostDetailActivity
class and into a separate class in theviewholder
package (now sitting pretty alongside its brotherPostViewHolder
).Snippets moved to firebase/snippets-android
See firebase/snippets-android#275
@samtstern there are some snippets that are present in this repo, but I can't find them in the docs.
For example, the
my_top_posts_query
, which is similar to another snippet already present in snippets-android:quickstart-android
quickstart-android/database/app/src/main/java/com/google/firebase/quickstart/database/java/fragment/MyTopPostsFragment.java
Lines 12 to 17 in 49bcffe
snippets-android
https://github.com/firebase/snippets-android/blob/45ba4822eb111609be2951c944142e3bbe891472/database/app/src/main/java/com/google/firebase/referencecode/database/QueryActivity.java#L98-L113
I can see its usage in the docs: https://firebase.google.com/docs/database/android/lists-of-data#sort_data
Snippets in a similar situation include:
comment_class
,single_value_read
anddeclare_database_ref
. Is it possible to check these against the snippet registry?