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

Android Basics: tip-calculator #210

@ghost

Description

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

In which task and step of the codelab can this issue be found?
Display the tip, step 3

Describe the problem
Code suggested is
binding.tipResult.text = getString(R.string.tip_amount, formattedTip)
but this doesn't work. A small change works:
binding.tipResult.text = getString(R.string.tip_amount) + formattedTip

Steps to reproduce?
Paste the code from the code lab, problem is highlighted in red in IntelliJ

Versions
Android Studio version: Using IntelliJ 2021.1.1
API version of the emulator:

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

Metadata

Metadata

Assignees

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