Skip to content

Android Basics: Viewmodel and State in Compose #285

Description

@mcmillantech

Item 6 "Update the GameLayout() composable function to display currentScrambledWord. Set the text parameter of the first text field in the column to currentScrambledWord."

It's not the first text field, it's the second.

Also the code snippet is not the same as either the starter or sulution code:

Snippet:
@composable
fun GameLayout(
// ...
) {
Column(
verticalArrangement = Arrangement.spacedBy(24.dp)
) {
Text(
text = currentScrambledWord,
fontSize = 45.sp,
modifier = modifier.align(Alignment.CenterHorizontally)
)
//...
}
}

Starter code:
Column(
verticalArrangement = Arrangement.spacedBy(mediumPadding),
Text(
text = ...
style = typography.displayMedium

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions