-
Notifications
You must be signed in to change notification settings - Fork 28
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
Practice problem: Click behavior #45
Comments
yea dude your concern is right and somewhat in the similar way i did it too package com.vroom_psshh.lemonade.screens import androidx.compose.foundation.Image @Preview(showBackground = true, showSystemUi = true) @composable
} |
I dont understand the following:
In step 5 "Implement the App" you write there isnt a button in this app and we should read through the clickable dokumentation to make every composable clickable.
When i take a look at the solution code after trying to get it working for hours there is a button added...
I also can seond that i this codelab are a lot of new things wich were never refered to before....
btw i dont understand any word in your documentation...neither the weight one wich was refered before, not this one or any other one so this will not help me in any way.
So can anyone explain it to me?
here is how i implemented it till now...
package com.example.lemonadecompose
import android.os.Bundle
import androidx.activity.ComponentActivity
import androidx.activity.compose.setContent
import androidx.compose.foundation.Image
import androidx.compose.foundation.background
import androidx.compose.foundation.clickable
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.height
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.width
import androidx.compose.foundation.layout.wrapContentSize
import androidx.compose.foundation.shape.RoundedCornerShape
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.Surface
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.runtime.getValue
import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.remember
import androidx.compose.runtime.setValue
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.res.painterResource
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.sp
import com.example.lemonadecompose.ui.theme.LemonadeComposeTheme
class MainActivity : ComponentActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContent {
LemonadeComposeTheme {
LemonadeApp()
}
}
}
}
@composable
@Preview
fun LemonadeApp() {
MakeLemonade(
modifier = Modifier
.fillMaxSize()
.wrapContentSize(Alignment.Center)
)
}
@composable
fun MakeLemonade(modifier: Modifier = Modifier) {
}
The text was updated successfully, but these errors were encountered: