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

Android Basics: recyclerview-scrollable-list #46

Closed
param-radadiya opened this issue Jun 20, 2021 · 1 comment
Closed

Android Basics: recyclerview-scrollable-list #46

param-radadiya opened this issue Jun 20, 2021 · 1 comment

Comments

@param-radadiya
Copy link

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

In which task and step of the codelab can this issue be found?
Course: Android Basics in Kotlin
Unit 2: Layouts
Sub Unit: Scrollable lists
Codelab Name: Use RecyclerView to display a scrollable list
Codelab Section : 5. Solution code

Describe the problem
In the file "affirmations/adapter/ItemAdapter.kt" there is an error on line no 44, holder.textView.text = context.resources.getString(item.stringResourceId)

Instead of stringResourceId in last part, we have to correct it with stringResourceID, Because in file "affirmations/model/Affirmation.kt" we had declared class variable "stringResourceID" as a parameter.

So, it creates an error because of the letter 'd', to solve the error just replace "stringResourceId" with "stringResourceID" at the line number 44 in file "affirmations/adapter/ItemAdapter.kt".

Or
Replace "stringResourceID" with "stringResourceId" at the line number 3 in file "affirmations/model/Affirmation.kt".

Steps to reproduce?

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

Versions
What version of Android Studio are you using?
Version 4.2.1

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

@osuleymanova
Copy link
Contributor

@param-radadiya
Thank you for reaching out to us. The issue is fixed: "stringResourceId" is in both packages "affirmations/model/Affirmation.kt" and "affirmations/adapter/ItemAdapter.kt"

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants