miqbaldc
12/29/2022, 5:49 AMModalBottomSheetState
See error log in 🧵Mod
12/29/2022, 6:26 AMAmrJyniat
12/29/2022, 12:24 PMcameraPositionState
or any other related state?Zoltan Demant
12/29/2022, 12:59 PMLazyColumn
that spans the entire screen height, how can I add contentPadding such that the first item is centered on screen initially (without making it super-janky)? 🎅🏽 Some more details in 🧵!dorche
12/29/2022, 1:05 PMshikasd
12/29/2022, 3:26 PMmattinger
12/29/2022, 3:58 PMDropdownMenu(....) {
TextField(...)
items.forEach {
DropdownMenuItem(...)
}
}
Jaime
12/29/2022, 9:26 PMCicero
12/29/2022, 10:13 PMTravis Griggs
12/29/2022, 10:16 PMTravis Griggs
12/29/2022, 10:16 PMDerrick Rocha
12/29/2022, 11:24 PMrkeazor
12/30/2022, 2:42 AMArjan van Wieringen
12/30/2022, 9:55 AM@Composable fun EventDetail(
selectedEvent: String,
viewModel: EventDetailViewModel = viewModel(selectedEvent),
modifier: Modifier = Modifier
) {
val state by viewModel.state.collectAsState()
EventDetail(
state = state,
onAmountToRecordChange = { raw -> viewModel.updateAmountToRecord(raw) },
onRecordingOffsetChange = { raw -> viewModel.updateRecordingOffset(raw) },
onRecordingStart = { viewModel.startRecording() },
onRecordingStop = { viewModel.stopRecording() },
onTrash = { viewModel.clearRecords() },
modifier = modifier
)
}
The state object is a simple data-class produced in the viewModel (which consists of some hot flows as well). The EventDetail composable gets triggered every frame even though the state doesn't change (the hashcode is consistently the same). Is this due to the collectAsState
implementation? Does that trigger every frame?Abdul Hafeez Sajid
12/30/2022, 10:48 AMonFocusChanged
callback is triggered on the initial composition on TextField/BasicTextField in compose 1.3.2 without any focusRequest or clicking. Is this normal behaviour? if yes, how to avoid it. Any guide?Yingding Wang
12/30/2022, 12:13 PMTravis Griggs
12/30/2022, 8:39 PMDerrick Rocha
12/30/2022, 9:21 PMAnimatedVisibility()
not changing visibility on iOS after the initial value is set. Has anyone doing Compose on iOS via the Application
method run into this issue? Thanks.sen
12/31/2022, 4:54 AMimage▾
DisposableEffect
is invoked within the AnimatedContent, but for whatever reason it seems to be "delayed" by a value. Observing the value (the actual one, not the previous) I saw it cycles between the current and value it just was right before it incremented. Iv79
12/31/2022, 10:25 AMfun getVehicle(vehicleId: Long): Vehicle? {
val vehicle = viewModelScope.launch {
repository.getVehicleById(vehicleId)
}
return vehicle
}
I know this is wrong. I just can't get my head around what is right.MR3Y
12/31/2022, 6:13 PMjava.lang.IllegalStateException: Vertically scrollable component was measured with an infinity maximum height constraints, which is disallowed. One of the common reasons is nesting layouts like LazyColumn and Column(Modifier.verticalScroll()). If you want to add a header before the list of items please add a header as a separate item() before the main items() inside the LazyColumn scope. There are could be other reasons for this to happen: your ComposeView was added into a LinearLayout with some weight, you applied Modifier.wrapContentSize(unbounded = true) or wrote a custom layout. Please try to remove the source of infinite constraints in the hierarchy above the scrolling container.
at androidx.compose.foundation.CheckScrollableContainerConstraintsKt.checkScrollableContainerConstraints-K40F9xA(CheckScrollableContainerConstraints.kt:36)
at androidx.compose.foundation.ScrollingLayoutModifier.measure-3p2s80s(Scroll.kt:336)
Thomas
01/01/2023, 6:12 AMThomas
01/01/2023, 6:14 AMUdi Oshi
01/01/2023, 5:54 PM@Composable
fun Shadow.simpleDropShadow(color: Color? = null, offset: Offset?, blurRadius: Float?) = Shadow(
color = color ?: colorResource(id = R.color.black_75),
offset = offset ?: Offset(x = 2f, y = 4f),
blurRadius = blurRadius ?: 0.1f
)
But no luck when trying to use in at all.
Appreciate your assitance 🙏Colton Idle
01/01/2023, 5:56 PMSagar yadav
01/02/2023, 5:05 AM1.0.0-alpha17
)
Is anyone using it in production ? I don’t see any issues reported on github
https://developer.android.com/jetpack/androidx/releases/pagingchanjungskim
01/02/2023, 8:29 AMval interactionSource = remember { MutableInteractionSource() }
and
val interactionSource by remember { MutableInteractionSource() }
and
val interactionSource by rememberSavable { MutableInteractionSource() }
???vide
01/02/2023, 9:12 AM@Immutable
but compose metrics reports it as unstable. Am I doing something wrong here? I think this only started happening when I refactored the class to a shared packagemyanmarking
01/02/2023, 10:46 AMUdi Oshi
01/02/2023, 1:28 PMval state = rememberModalBottomSheetState(ModalBottomSheetValue.HalfExpanded)
val scope = rememberCoroutineScope()
ModalBottomSheetLayout(
modifier = Modifier.fillMaxSize(),
sheetState = state,
sheetContent = {
Box(modifier = Modifier
.height(120.dp)
.background(color = Color.Red)) {
Text(text = "Half expanded")
}
}) {
// Full screen content
}
and keep getting:
java.lang.IllegalArgumentException: The initial value must have an associated anchor.
What am I doing wrong? 🙏Udi Oshi
01/02/2023, 1:28 PMval state = rememberModalBottomSheetState(ModalBottomSheetValue.HalfExpanded)
val scope = rememberCoroutineScope()
ModalBottomSheetLayout(
modifier = Modifier.fillMaxSize(),
sheetState = state,
sheetContent = {
Box(modifier = Modifier
.height(120.dp)
.background(color = Color.Red)) {
Text(text = "Half expanded")
}
}) {
// Full screen content
}
and keep getting:
java.lang.IllegalArgumentException: The initial value must have an associated anchor.
What am I doing wrong? 🙏Csaba Szugyiczki
01/02/2023, 1:32 PMUdi Oshi
01/02/2023, 1:33 PMCsaba Szugyiczki
01/02/2023, 1:34 PMUdi Oshi
01/02/2023, 1:38 PMval state = rememberModalBottomSheetState(ModalBottomSheetValue.HalfExpanded)
val scope = rememberCoroutineScope()
ModalBottomSheetLayout(
modifier = Modifier.fillMaxSize(),
sheetState = state,
sheetContent = {
Box(
modifier = Modifier
.height(120.dp)
.defaultMinSize(minHeight = 1.dp)
.background(color = Color.Red)
) {
Text(text = "Half expanded")
}
}) {
// Full screen content
Box(
modifier = Modifier
.defaultMinSize(minHeight = 1.dp)
.fillMaxSize()
) {
Text(text = "Hello content")
}
Cleanest and still crashesCsaba Szugyiczki
01/02/2023, 1:45 PMUdi Oshi
01/02/2023, 1:46 PMCsaba Szugyiczki
01/02/2023, 1:47 PMUdi Oshi
01/02/2023, 1:49 PMLaunchedEffect(key1 = state, block = {
if (state.currentValue == ModalBottomSheetValue.Hidden) {
state.animateTo(ModalBottomSheetValue.HalfExpanded)
}
})
crashes it with same exception
🙅Csaba Szugyiczki
01/02/2023, 1:57 PMUdi Oshi
01/02/2023, 1:58 PMLaunchedEffect(key1 = state, block = {
if (state.currentValue == ModalBottomSheetValue.Hidden) {
scope.launch {
delay(2500)
state.animateTo(ModalBottomSheetValue.HalfExpanded)
}
}
})
same result. How many workarounds we need to use in order to show this component? 😂Csaba Szugyiczki
01/02/2023, 2:07 PMUdi Oshi
01/02/2023, 2:17 PMjossiwolf
01/03/2023, 7:38 AMCsaba Szugyiczki
01/03/2023, 8:05 AMjossiwolf
01/03/2023, 8:28 AMCsaba Szugyiczki
01/03/2023, 8:29 AMjossiwolf
01/03/2023, 8:36 AMUdi Oshi
01/03/2023, 8:52 AM