Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

06-navigation #13

Open
wants to merge 1 commit into
base: 05-paging
Choose a base branch
from
Open

06-navigation #13

wants to merge 1 commit into from

Conversation

Serchinastico
Copy link
Contributor

This PR is not meant to be merged

This is how to use the Navigation component:

  • Transform all activities into fragments as navigation components are done with a fragment manager under the hood. No big deal with lifecycle methods, the layout is inflated on the onCreateView method and we update the binding on the onViewCreated.
  • Define navigation between screens inside the navigation_graph.xml resource file. It defines input arguments and with the safeargs plugin we automatically create classes to navigate through fragments.
  • Include the new fragment testing library so that we don't have to create an empty activity ourselves. I opted for this solution because reusing the MainActivity for testing purposes was making tests crash. We are losing the toolbar checks as we are now showing an activity with only the fragment.

@Serchinastico Serchinastico force-pushed the 06-navigation branch 2 times, most recently from 4e8e60e to d4af8a6 Compare March 7, 2019 14:56
@Serchinastico Serchinastico force-pushed the 05-paging branch 2 times, most recently from 7072c5f to e22c667 Compare March 15, 2019 17:33
Start moving the main activity to a fragment

Continue moving stuff from the main activity to a fragment

Finish moving the SuperHeroesFragment

Navigate to super hero detail

Migrate edit super hero screen

Start migrating tests

Start migrating tests

Fix tests

Own code review

Fix toolbar using the NavigationUI class
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant