Gabriel
02/28/2021, 2:30 PMrobnik
02/28/2021, 3:03 PMCanvas
. I use Modifier.draggable
, but the handler does not have access to the Canvas's width, to constrain the drag. How can I pass the Canvas's width to the drag handler? Example in thread...Se7eN
02/28/2021, 4:30 PMModalBottomSheetLayout
with BottomSheetScaffold
. I have a TextField
in the sheetContent of BottomSheetScaffold
but I'm getting a crash when the TextField
goes out of focus or I hide the keyboard. Is this a bug or am I not supposed to use ModalBottomSheet
and BottomSheetScaffold
together?Bradleycorn
02/28/2021, 4:37 PMModalBottomSheetLayout
... I have one setup to show a simple Text
composable in the bottom sheet. But if I try to pass in the text to show, it doesn't work. The bottom sheet doesn't even show up. But if I "hard code" the text, it works fine. Code posted in the thread ...Mini
02/28/2021, 4:44 PMcombine(snapshotFlow { myMutableStateMap.toMap() }, stateFlowA, stateFlowB)
Daniel
02/28/2021, 4:50 PMSlackbot
02/28/2021, 5:35 PMJordi Saumell
02/28/2021, 5:50 PMZhelyazko Atanasov
02/28/2021, 6:37 PMImage
and Modifier.shadow
? I'm applying a shadow to an image, but no shadow is drawn.robnik
02/28/2021, 8:17 PMTextFieldValue.selection
and changing it in Modifier.onFocusChanged
but no luck so far.Blundell
02/28/2021, 9:37 PMVinay Gaba
03/01/2021, 1:55 AMShivam Sethi
03/01/2021, 2:43 AMaherbel
03/01/2021, 3:20 AMSamir Basnet
03/01/2021, 8:01 AM@Composable
fun ProgressStep(modifier:Modifier,max: Int, current: Int) {
Layout(modifier = modifier,
content = {
for (i in 1..max)
StepCircle(step = i, color = if (i <= current) purple else Color.Gray)
}) { measurables, constraints ->
val startPoint = (constraints.maxWidth/max)/2
val placeables = measurables.map { measurable ->
measurable.measure(constraints.copy(minWidth = 0))
}
layout(constraints.maxWidth, constraints.minWidth) {
var xPosition = startPoint
placeables.forEachIndexed { index, placeable ->
placeable.place(x = xPosition-11, y = constraints.maxHeight / 2)
xPosition += (startPoint * 2)
}
}
}
}
i noticed the mesurements here are accepted in Integer so the gap after the last item in less compared to others. how am i supposed to gap equally here?Samir Basnet
03/01/2021, 9:09 AMLukasz Burcon
03/01/2021, 10:03 AMLayout
and measure it in multiple layout passes as you can’t call measurables.measure()
multiple times in the same layout
section.
Do you guys plan on opening MultiMeasureLayout API that’s internally used in ConstraintLayout so I don’t have to do multiple layout passes and just remeasure my view in one layout pass? Or is there any better solution to my problem you know about?Gabriel
03/01/2021, 10:51 AMAdriano Celentano
03/01/2021, 11:20 AMDaniel
03/01/2021, 12:10 PMShivam Sethi
03/01/2021, 12:20 PMSamir Basnet
03/01/2021, 12:55 PMOrhan Tozan
03/01/2021, 1:13 PMsuppressKotlinVersionCompatibilityCheck
but don't say I didn't warn you!).`
Is it recommended to use suppressKotlinVersionCompatibilityCheck
or revert from 1.4.31 to 1.4.30?giorgos
03/01/2021, 1:51 PMapp:prefixText
I cannot find it in androidx.compose.material.TextField
Could it be it is not implemented yet?Utkarsh Tiwari
03/01/2021, 1:54 PMAdriano Celentano
03/01/2021, 2:26 PMgrandstaish
03/01/2021, 3:12 PMandroidx.compose.ui.input.pointer
don’t show up in Android Studio? Almost all other compose modules download and show sources correctly.Nikola Drljaca
03/01/2021, 4:54 PMJNI DETECTED ERROR IN APPLICATION: JNI CallVoidMethodV called with pending exception java.lang.NoSuchMethodError: no non-static method "Landroidx/compose/runtime/HotReloader$Companion;.saveStateAndDispose(Ljava/lang/Object;)V"
. The trace is pretty extensive after that first line. Is anyone else having this issue? Been googling a bit but can't find anything.Olivier Patry
03/01/2021, 5:56 PM@Composable
fun MainLayout(catRepository: CatRepository = (CatRepository((FakeCatDataSource())))) {
val catsViewModel = viewModel<CatsViewModel>(factory = CatsViewModelFactory(catRepository))
Surface(color = MaterialTheme.colors.background) {
when {
!booleanResource(R.bool.is_tablet) -> MainLayoutTabletPhone(catsViewModel)
booleanResource(R.bool.is_portrait) -> MainLayoutTabletPortrait(catsViewModel)
else -> MainLayoutTabletLandscape(catsViewModel)
}
}
}
Timon Bohn
03/01/2021, 5:57 PMTimon Bohn
03/01/2021, 5:57 PMDaniel
03/01/2021, 7:15 PMTimon Bohn
03/01/2021, 9:30 PM