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

Assignment: Navigation Component and RecyclerView #2

Open
safaorhan opened this issue May 2, 2021 · 0 comments
Open

Assignment: Navigation Component and RecyclerView #2

safaorhan opened this issue May 2, 2021 · 0 comments

Comments

@safaorhan
Copy link
Owner

Background

In the lectures we moved to using Fragments instead of Activities to represent our screens. We also integrated Navigation Component to easily navigate among the screens. You need to apply to same transformation for the Signup screen you implemented last week.

Also, we have seen how to implement a RecyclerView to show a grid of producrs. You need to apply this knowledge to come up with the implementation of Related products section in ProductDetail screen.

Product Detail

Todo

  • Create SignupFragment and move logic from SignupActivity into there, deleting SignupActivity.
  • Add SignupFragment to the nav_graph.xml adding necessary actions.
  • Add a function fun relatedProducts(productId: Int): List<Product> into ProductStore which returns arbitrary (random or any logic) list of related products
  • Add the Related Products section into ProductDetailFragment which gets data from ProductStore and displays it in a horizontal RecyclerView.
  • Add a click listener to the related products which would navigate user to ProductDetailFragment for the clicked product.
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

No branches or pull requests

1 participant