Skip to content
This repository was archived by the owner on Dec 10, 2024. It is now read-only.
This repository was archived by the owner on Dec 10, 2024. It is now read-only.

Add separate branch implementing optional step from codelab #4

@shumelchyk

Description

@shumelchyk

Add separate branch implementing optional step from codelab:

  1. [Optional] Try Dependency Injection on your own
    There's one more part of the codelab app for you to experiment with, and that's refactoring to have a SplashScreen: MainActivity.kt handles the logic of what screen needs to be shown when opening the app. That's problematic because we're doing conditional dependency injection, only injecting when the user will remain on the MainActivity.

These steps don't contain comments or code, so try it on your own:

Create a SplashActivity with a SplashViewModel that handles the logic of what screen to display.
As we've been doing, use dependency injection in SplashActivity to get fields injected by Dagger.
Remove the logic in the onCreate method of the MainActivity.kt since when the Activity is opened, the user will be logged in.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions