Skip to content

Fix multiple item types list snippet#925

Open
nero002 wants to merge 1 commit into
android:mainfrom
nero002:dheeraj/fix-list-multiple-item-types
Open

Fix multiple item types list snippet#925
nero002 wants to merge 1 commit into
android:mainfrom
nero002:dheeraj/fix-list-multiple-item-types

Conversation

@nero002
Copy link
Copy Markdown
Contributor

@nero002 nero002 commented May 20, 2026

This corrects the multiple item types snippet used by the Compose quick guide.

Test: ANDROID_HOME=/Users/Dheeraj/Library/Android/sdk ./gradlew :compose:snippets:compileDebugKotlin

@nero002 nero002 requested a review from a team as a code owner May 20, 2026 06:21
@nero002 nero002 requested a review from riggaroo May 20, 2026 06:21
@google-cla
Copy link
Copy Markdown

google-cla Bot commented May 20, 2026

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request refactors a LazyColumn implementation to correctly handle multiple item types by removing an erroneous internal loop and utilizing the item index. It also updates the contentType parameter to use the message class for better performance. A review comment identifies the use of org.w3c.dom.Text as inappropriate for Android development and suggests refactoring to use a String or a custom data class.

@nero002 nero002 force-pushed the dheeraj/fix-list-multiple-item-types branch from 64e92fa to c2f3566 Compare May 20, 2026 08:20
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

Successfully merging this pull request may close these issues.

ListWithMultipleItemTypes.kt — Incorrect usage of items() lambda and contentType

1 participant