Nat Strangerweather
04/04/2022, 3:53 PMdimsuz
04/04/2022, 4:06 PMMyLayout(slot = { visible -> AnimatedVisibility(visible) { ... } })
and the logic is such that I want that visible
to be calculated based on available height and slot size: I measure my "slot" then if it fits, I pass visibility = true
, otherwise false
.
I wanted to use SubcomposeLayout
for this but turns out that to calculate visible
I need to subcompose/measure
that slot and to subcompose/measure
it I need to calculate visible
🐔 🥚
Is this possible? Inner State + recompose?Luke
04/04/2022, 6:24 PMZoltan Demant
04/05/2022, 4:08 AMAndroid75
04/05/2022, 4:11 AMTgo1014
04/05/2022, 9:34 AMLazyRow
? The idea would be to manually controle the LazyRow
position to sync the scroll when dragging a pagerkrzysztof
04/05/2022, 11:33 AMkotlinOptions {
freeCompilerArgs = listOf("-P", "plugin:androidx.compose.compiler.plugins.kotlin:suppressKotlinVersionCompatibilityCheck=true")
}
But then I get this error
java.lang.NoSuchMethodError: 'org.jetbrains.kotlin.ir.expressions.impl.IrSetFieldImpl org.jetbrains.kotlin.ir.builders.ExpressionHelpersKt.irSetField(org.jetbrains.kotlin.ir.builders.IrBuilderWithScope, org.jetbrains.kotlin.ir.expressions.IrExpression, org.jetbrains.kotlin.ir.declarations.IrField, org.jetbrains.kotlin.ir.expressions.IrExpression)'
From Kotlin compilerjosefdolezal
04/05/2022, 12:13 PMText
with annotated string and embed images using inlineContent
. What I am unable to do is to correctly align embedded content on text’s base line. Details in 🧵Dejan Dobnikar
04/05/2022, 12:23 PMAnimator.pause()
/`Animator.resume()` , which would work with all animation types (animate*asState/Animatable/updateTransition)? In the API reference I haven’t found anything related.
For example I would like to pause/resume long-running animation on button click and also pause animation if activity is paused.
One idea that I had is to have custom AnimationSpec
and override vectorize
fun which would return VectorizedAnimationSpec
which would handle pause, but that does not sound like the best way to do it.Aaron Waller
04/05/2022, 2:09 PMRow(horizontalArrangement = Arrangement.SpaceBetween) { //Not working :(
items.forEach { item ->
BottomNavigationItem(
icon = { Icon(painterResource(id = item.icon), contentDescription = item.title) },
label = { Text(text = item.title) },
selectedContentColor = Color.White,
unselectedContentColor = Color.White.copy(0.4f),
alwaysShowLabel = true,
selected = currentRoute == item.route,
onClick = {
navController.navigate(item.route) {
navController.graph.startDestinationRoute?.let { route ->
popUpTo(route) {
saveState = true
}
}
launchSingleTop = true
restoreState = true
}
}
)
}
}
Romão
04/05/2022, 3:15 PMColton Idle
04/05/2022, 5:42 PMFatal Exception: java.lang.IllegalArgumentException end cannot negative. [end: -1]
androidx.compose.ui.text.TextRangeKt.packWithCheck (TextRange.kt:124)
androidx.compose.ui.text.TextRangeKt.TextRange (TextRange.kt:37)
androidx.compose.ui.text.input.EditingBuffer.delete$ui_text_release (EditingBuffer.kt:205)
androidx.compose.ui.text.input.DeleteSurroundingTextCommand.applyTo (EditCommand.kt:271)
androidx.compose.ui.text.input.EditProcessor.apply (EditProcessor.kt:110)
Kivia Brito
04/05/2022, 6:09 PMModifier.
.clickable(enable = true)
.focusable(enable = true)
And using the method
fun SemanticsNodeInteraction.assertIsNotEnabled(): SemanticsNodeInteraction = assert(isNotEnabled())
but my SemanticsConfiguration
doesn't seems to contain the
SemanticsProperties.Disabled
key.
Any thoughts in how to include this key to my SemanticsConfiguration
?Chris Fillmore
04/05/2022, 8:14 PMpostSplashScreenTheme
still important in this case? I don’t have a theme to reference here.romainguy
04/05/2022, 9:49 PMnatario1
04/06/2022, 12:20 AMIcyrockton
04/06/2022, 7:58 AMSlackbot
04/06/2022, 8:58 AMBino
04/06/2022, 11:46 AMbackgroundTint
be translated to compose buttons?Lasse Magnussen
04/06/2022, 1:53 PMjulioromano
04/06/2022, 3:00 PMColorUtils.calculateContrast()
but I was looking for something not tied to the Android SDK.julioromano
04/06/2022, 3:01 PMColorSpaces
.Mehdi Haghgoo
04/06/2022, 3:02 PMfrank
04/06/2022, 4:37 PMColumn() {
Surface(
color = MaterialTheme.colors.primary
) {
Text(
"Users:",
Modifier.fillMaxWidth(),
style = MaterialTheme.typography.h5.copy(fontWeight = FontWeight.ExtraBold),
textAlign = TextAlign.Center
)
}
Divider()
LazyColumn( // List names
modifier = Modifier.padding(vertical = 4.dp)
) {
items(names) { name ->
NamePickerItem(name)
}
}
NamePickerName(name = "LuisEnrique2") // Extra item for compare
}
dimsuz
04/06/2022, 4:44 PMimmutableStateOf(value)
?
Usecase:
val state = when (orientation) {
Orientation.Landscape -> animateDpAsState(32.dp)
Orientation.Portrait -> immutableStateOf(16.dp)
}
I could use mutableStateOf(16.dp)
of course, just thought maybe something more lightweight exists.nuhkoca
04/06/2022, 4:55 PM.onGloballyPositioned {
val rect = it.boundsInRoot()
onTitleEdgeMeasured(rect.top.roundToInt())
}
dazza5000
04/06/2022, 5:03 PMenighma
04/06/2022, 5:53 PMMicko Cabacungan
04/06/2022, 6:52 PMcollectAsState
but if I do that for a SharedFlow, it will remember the last value, instead of firing and forgeteygraber
04/06/2022, 9:26 PMeygraber
04/06/2022, 9:26 PMjw
04/06/2022, 9:27 PMjim
04/07/2022, 9:38 PMjw
04/08/2022, 12:16 AM