Mayank Wadhwa
02/25/2021, 1:39 PMalorma
02/25/2021, 2:59 PMTopBar
shows the arrow in a really strange position...is it intended?
Scaffold(
topBar = {
TopAppBar(
navigationIcon = { Icon(
imageVector = Icons.Default.ArrowBack,
contentDescription = "back"
) },
title = { Text(text = "Puppy ${puppyId.value}") },
backgroundColor = MaterialTheme.colors.primary,
)
}) {
}
Shakil Karim
02/25/2021, 3:15 PMmmaillot
02/25/2021, 4:02 PMColumn(modifier = Modifier.fillMaxHeight(), verticalArrangement = Arrangement.SpaceBetween) {
Header()
Content()
Bottom()
}
I have this code for the whole screen. In my Content
component, I have the 6 squares which are well aligned with SpaceAround
.
Column(
modifier = Modifier.fillMaxWidth(),
verticalArrangement = Arrangement.SpaceAround,
) {
Row(
horizontalArrangement = Arrangement.SpaceAround,
modifier = Modifier.fillMaxWidth(),
) {
Square()
Square()
Square()
}
Row(
horizontalArrangement = Arrangement.SpaceAround,
modifier = Modifier.fillMaxWidth(),
) {
Square()
Square()
Square()
}
}
I want the green part to take all place between Header (fixed height) and ProgressBar (fixed height too).alorma
02/25/2021, 4:05 PMRanger
like SLider
but with min / max selector?Arun
02/25/2021, 4:08 PMwhy
02/25/2021, 4:20 PMimplementation 'androidx.core:core-ktx:1.3.2'
implementation 'androidx.appcompat:appcompat:1.2.0'
implementation 'com.google.android.material:material:1.3.0'
implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.3.0'
Timo Drick
02/25/2021, 5:07 PMAlertDialog(
onDismissRequest = { onAction(DismissDialog) },
text = {
Column {
Row(verticalAlignment = Alignment.Bottom) {
Text(text = description, Modifier.weight(2f))
Image(
modifier = Modifier.weight(1f).padding(end = 4.dp),
painter = painterResource(id = R.drawable.ic_mango_shake),
contentDescription = "mango shake",
contentScale = ContentScale.Inside
)
}
}
},...
manueldidonna
02/25/2021, 5:30 PMLazyColumn
and CoilImage
without setting a Modifier.height
on it. The scroll offset is resetted to 0 every time I scroll up. @cb I tried with Image
and painterResource
and the bug is absent so I think it depends on AccompanistLucien Guimaraes
02/25/2021, 5:52 PMDenis
02/25/2021, 7:25 PMalorma
02/25/2021, 8:05 PMVitor Prado
02/25/2021, 9:15 PMdeniskrr
02/25/2021, 9:19 PMDominaezzz
02/25/2021, 10:50 PMproduceState
should forget the initial value if any of the input keys change.Shivam Sethi
02/26/2021, 1:44 AMShivam Sethi
02/26/2021, 1:49 AMTlaster
02/26/2021, 3:24 AMcavega
02/26/2021, 4:02 AMModifier.padding()
. Am I missing something? This is with a new project created via Android Studio Arctic Fox | 2020.3.1 Canary 8. Just barely started on Lesson 1 here https://developer.android.com/jetpack/compose/tutorialNeal Sanche
02/26/2021, 5:03 AMMehdi Haghgoo
02/26/2021, 5:50 AMallan.conda
02/26/2021, 7:10 AMvectorResource()
with painterResource()
caused this issue, any idea how to fix it? Or should I file a bug?Tijs Gobbens
02/26/2021, 7:58 AM@Preview
feature, is. there something I could pass into a composable with preview as a NavController?Nathan Castlehow
02/26/2021, 8:28 AMalorma
02/26/2021, 8:32 AMchrisxinyue
02/26/2021, 8:57 AMMarcin Środa
02/26/2021, 9:20 AMpressIndicatorGestureFilter
? Looks like I should use Modifier.pointerInput
with detectTapGestures
, but how to handle press / cancel / stop states?alorma
02/26/2021, 9:31 AMSurface
is a `Box, shouldn't the content
slot be BoxScope.() -> Unit
?Timon Bohn
02/26/2021, 9:59 AMalorma
02/26/2021, 9:59 AMbackgroundColor = MaterialTheme.colors.primary.copy(alpha = 0.12f).compositeOverSurface()
That is supposed to do a dim version of primary
color... but it shows plain primary
alorma
02/26/2021, 9:59 AMbackgroundColor = MaterialTheme.colors.primary.copy(alpha = 0.12f).compositeOverSurface()
That is supposed to do a dim version of primary
color... but it shows plain primary
Vivek Sharma
02/26/2021, 12:23 PMcompositeOverSurface
for ? can you try removing it and tryalorma
02/26/2021, 12:30 PMcompositeOverSurface
puts one color "over" surface, so if the color has alpha, it will draw a solid version, but provided by surface...Vivek Sharma
02/26/2021, 12:58 PMMaterialTheme.colors.primary.compositeOverSurface().copy(alpha = 0.12f)
check if this works for you