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 #103

Open
LukeAO opened this issue May 31, 2024 · 0 comments
Open

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

LukeAO opened this issue May 31, 2024 · 0 comments

Comments

@LukeAO
Copy link

LukeAO commented May 31, 2024

URL of codelab
https://developer.android.com/codelabs/basic-android-kotlin-compose-navigation?continue=https%3A%2F%2Fdeveloper.android.com%2Fcourses%2Fpathways%2Fandroid-basics-compose-unit-4-pathway-2%23codelab-https%3A%2F%2Fdeveloper.android.com%2Fcodelabs%2Fbasic-android-kotlin-compose-navigation#5

In which task and step of the codelab can this issue be found? --> N/A

Describe the problem

I discovered at this section of the CodeLab that the code provided had a small - what I think to be - mistake.
In the SummaryScreen file when declaring the "orderSummary" variable, it came this way:
//Load and format a string resource with the parameters.
val orderSummary = stringResource(
R.string.order_details,
numberOfCupcakes,
orderUiState.flavor,
orderUiState.date,
orderUiState.quantity

However when the app submits this to the intent you don't need the Quantity sent twice since thats being done by "numberOfCupcakes"

I believe it should've been set to price

//Load and format a string resource with the parameters.
val orderSummary = stringResource(
R.string.order_details,
numberOfCupcakes,
orderUiState.flavor,
orderUiState.date,
orderUiState.price

This is also present in the solution code.

Steps to reproduce? --> N/A

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

Versions --> N/A
Android Studio version:
API version of the emulator:

Capture

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