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

Navigate between screens with Compose: Android Basics with Compose #111

Open
mebratu-wakeni opened this issue Oct 15, 2024 · 0 comments
Open

Comments

@mebratu-wakeni
Copy link

URL of codelab
https://developer.android.com/codelabs/basic-android-kotlin-compose-navigation#6

In which task and step of the codelab can this issue be found?
7. Make the app bar respond to navigation

Describe the problem
The instruction which says
7. In the CupcakeApp composable, below the navController variable, create a variable named backStackEntry and call the currentBackStackEntryAsState()method of navController using the by delegate.

But navController is a function parameter not a variable created inside the function. So I guess backStackEntry is to be placed at the beginning of the function body.

Here is another one

The code snippet following
3. Pass the value of currentScreen variable into the parameter of the same name of the CupcakeAppBar composable.

Seems to give the impression that the modifier optional parameter should be removed as it is repeated in a previous instruction which says

  1. Add a parameter named currentScreen of type CupcakeScreen to the CupcakeAppBar composable.

In which case the parameters are correctly displayed in the corresponding snippet.

One final comment

The instruction related to

As long as there's a screen behind the current screen on the back stack, the Up button should show. You can use a boolean expression to identify if the Up button should appear:

are a bit difficult for a less experienced developer in Android, because the style adopted in the courses are usually precise instructions, but here the location where the change is going to be effected are not clearly specified.

Steps to reproduce?

not necessary it is just on the instructions

  1. Go to...
  2. Click on...
  3. See error...

Versions
Android Studio version:
API version of the emulator:

Additional information
Include screenshots if they would be useful in clarifying the problem.

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