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

Intro to state in Compose: Android Basics with Compose #232

Open
SaiTeja77949 opened this issue Sep 9, 2024 · 0 comments
Open

Intro to state in Compose: Android Basics with Compose #232

SaiTeja77949 opened this issue Sep 9, 2024 · 0 comments

Comments

@SaiTeja77949
Copy link

URL of codelab

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

In which task and step of the codelab can this issue be found?
Intro to state of compose
Step: 3

Describe the problem

fun EditNumberField(modifier: Modifier = Modifier) {
TextField(
value = "",
onValueChange = {},
modifier = modifier
)
}

EditNumberField(modifier = Modifier.padding(bottom = 32.dp).fillMaxWidth())

If we do this the TextField element will not align with the other texts (calculate tip and Tip amount)
To solve this In text field we need to do :
TextField(
value = "",
onValueChange = {},
modifier = Modifier.fillMaxWidth()
)

Versions
Android Studio version: iguana

image

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