Jan Skrasek
03/03/2021, 8:04 PMTheMrCodes
03/03/2021, 8:47 PMJordi Saumell
03/03/2021, 9:13 PMFunkyMuse
03/03/2021, 9:33 PMbruno.aybar
03/03/2021, 10:39 PMCanvas
?Denis
03/04/2021, 1:50 AM.zIndex
, but it only works "for the children of the same layout parent". Code in the thread.sen kumar
03/04/2021, 1:59 AMJason Inbody
03/04/2021, 2:30 AMjava.lang.NoSuchMethodError: 'void org.jetbrains.kotlin.serialization.DescriptorSerializer$Companion.registerSerializerPlugin(org.jetbrains.kotlin.serialization.DescriptorSerializerPlugin)'
at androidx.compose.compiler.plugins.kotlin.ComposeComponentRegistrar$Companion.registerProjectExtensions(ComposePlugin.kt:152)
at androidx.compose.compiler.plugins.kotlin.ComposeComponentRegistrar.registerProjectComponents(ComposePlugin.kt:102)
at org.jetbrains.kotlin.cli.jvm.compiler.KotlinCoreEnvironment$Companion.registerExtensionsFromPlugins$cli(KotlinCoreEnvironment.kt:584)
at org.jetbrains.kotlin.cli.jvm.compiler.KotlinCoreEnvironment$ProjectEnvironment.registerExtensionsFromPlugins(KotlinCoreEnvironment.kt:132)
at org.jetbrains.kotlin.cli.jvm.compiler.KotlinCoreEnvironment.<init>(KotlinCoreEnvironment.kt:172)
at org.jetbrains.kotlin.cli.jvm.compiler.KotlinCoreEnvironment.<init>(KotlinCoreEnvironment.kt)
at org.jetbrains.kotlin.cli.jvm.compiler.KotlinCoreEnvironment$Companion.createForProduction(KotlinCoreEnvironment.kt:426)
at org.jetbrains.kotlin.cli.jvm.K2JVMCompiler.createCoreEnvironment(K2JVMCompiler.kt:226)
at org.jetbrains.kotlin.cli.jvm.K2JVMCompiler.doExecute(K2JVMCompiler.kt:152)
at org.jetbrains.kotlin.cli.jvm.K2JVMCompiler.doExecute(K2JVMCompiler.kt:52)
at org.jetbrains.kotlin.cli.common.CLICompiler.execImpl(CLICompiler.kt:88)
at org.jetbrains.kotlin.cli.common.CLICompiler.execImpl(CLICompiler.kt:44)
at org.jetbrains.kotlin.cli.common.CLITool.exec(CLITool.kt:98)
at org.jetbrains.kotlin.incremental.IncrementalJvmCompilerRunner.runCompiler(IncrementalJvmCompilerRunner.kt:386)
at org.jetbrains.kotlin.incremental.IncrementalJvmCompilerRunner.runCompiler(IncrementalJvmCompilerRunner.kt:110)
at org.jetbrains.kotlin.incremental.IncrementalCompilerRunner.compileIncrementally(IncrementalCompilerRunner.kt:286)
at org.jetbrains.kotlin.incremental.IncrementalCompilerRunner.compileImpl$rebuild(IncrementalCompilerRunner.kt:99)
at org.jetbrains.kotlin.incremental.IncrementalCompilerRunner.compileImpl(IncrementalCompilerRunner.kt:114)
at org.jetbrains.kotlin.incremental.IncrementalCompilerRunner.compile(IncrementalCompilerRunner.kt:74)
at org.jetbrains.kotlin.daemon.CompileServiceImplBase.execIncrementalCompiler(CompileServiceImpl.kt:607)
at org.jetbrains.kotlin.daemon.CompileServiceImplBase.access$execIncrementalCompiler(CompileServiceImpl.kt:96)
at org.jetbrains.kotlin.daemon.CompileServiceImpl.compile(CompileServiceImpl.kt:1659)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at java.rmi/sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:359)
at java.rmi/sun.rmi.transport.Transport$1.run(Transport.java:200)
at java.rmi/sun.rmi.transport.Transport$1.run(Transport.java:197)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at java.rmi/sun.rmi.transport.Transport.serviceCall(Transport.java:196)
at java.rmi/sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:562)
at java.rmi/sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:796)
at java.rmi/sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.lambda$run$0(TCPTransport.java:677)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at java.rmi/sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:676)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:834)
Denis
03/04/2021, 4:31 AMCh8n
03/04/2021, 6:23 AMUtkarsh Tiwari
03/04/2021, 8:05 AMAlbert Chang
03/04/2021, 9:57 AMgraphicsLayer()
doesn't seem to work. (Details in thread)zhuinden
03/04/2021, 10:04 AMArchie
03/04/2021, 10:12 AMTextField
inside a LazyColumn
. If I focus on the Textfield
(which naturally opens the SoftKeyboard
) and scroll to the point where the focused TextField isn't in the screen, it throws an error :
Try to begin a session [IME_SESSION] whose parent [INPUT_VIEW_SESSION] hasn't begunMay I ask for some advice?
Ali Albaali
03/04/2021, 10:27 AMjulioromano
03/04/2021, 10:52 AMandroid:tileMode="repeat"
we used to use in drawable XMLs ? (I have a drawable which I’d like to display tiled).curtjrees
03/04/2021, 11:53 AMArchie
03/04/2021, 1:37 PMAlertDialog
so it is Anchord at the Bottom of the screen rather than the middle?Thiago
03/04/2021, 2:27 PM// Sample 1
.listenParent { progress ->
if (progress < 0.1f) // update opacity state to start opacity animation
else if (progress < 0.25f) // update width state to start width animation
...
}
// Sample 2
@Composable
fun OpacityComposable(parentProgress: Float = 0f, parentTimeMs: Long = 300) {
val target = (parentProgress / 0.1f).coercIn(0f, 1f)
// Ignore the unexpected behavior where the parent restart will first animate opacity to 0f before 1f
val opacity = animateFloatAsState(
targetValue = target,
animationSpec = tween(
durationMillis = parentTimeMs * 0.1f, // Is it the way to keep time sync between them?
easing = LinearOutSlowInEasing // To have an independent curve
)
)
}
escodro
03/04/2021, 2:43 PMperformClick()
functions in Instrumented Tests after updating to Compose 1.0.0-beta01?
After the update it is not clicking at all in any views.
Thanks in advance!Deepak Gahlot
03/04/2021, 3:17 PMSe7eN
03/04/2021, 3:51 PMSnapshotStateList
of Path
. How do I redraw when I edit one of my Path
objects from the list? I'm implementing drawing with finger
Canvas(
modifier.pointerInput(Unit) {
detectDragGestures(
onDragStart = { position -> paths.add(Path().also { moveTo(...) }) },
onDragEnd = { ... },
onDragCancel = { ... },
onDrag = { change, dragAmount ->
change.consumePositionChange()
paths.last().quadraticBezierTo(...)
}
)
}
) {
paths.value.forEach { path ->
drawPath(path, ...)
}
}
Arun
03/04/2021, 4:07 PMBox
items. Let’s say I have the following. How do I make sure the Box
child composables are perfect squares? What value do I have to set it’s height
to?
@Composable
@Preview
fun PreviewSquareItems() {
Row(modifier = Modifier.fillMaxWidth()) {
val total = 2
repeat(total) { index ->
Box(
modifier = Modifier
.weight(1f)
.height(245.dp) // how to find this height?
.clip(RoundedCornerShape(8.dp))
.background(color = Color.Blue),
)
if (index + 1 < total) {
Spacer(modifier = Modifier.width(10.dp))
}
}
}
}
timmy
03/04/2021, 4:38 PMLocalAppWindow.current.height
Vivek Sharma
03/04/2021, 5:08 PMsize of custom width or height
in Canvas
, while drawing Rect
I am hacking it like taking whole canvas size using size
which gives me Canvas size and then doing size.copy(customWidth, customHeight)
prev there was Size() function but cant access it now?
how can I make size of custom width or height?Denis
03/04/2021, 5:21 PMdrawImage
method, but it accepts only an ImageBitmap. Probably I need to convert ImageVector to ImageBitmap, but I don't understand howrachael
03/04/2021, 5:29 PMgrandstaish
03/04/2021, 5:53 PMFontFamily
, FontWeight
, and FontStyle
into a platform Typeface
? It looks like TypefaceAdapter
is what I want but it’s internalak
03/04/2021, 6:00 PMbeta01
compiler error when using the latest Koin 3.0.1-alpha-6
, and injecting a viewmodel instance via getViewModel()
in your @Composable function?
(further stacktrace in thread)Internal error: Couldn't inline method call 'getViewModel'
Vivek Sharma
03/04/2021, 8:01 PMTextField
inside Dialog
, when I close the dialog , app crashes saying
java.lang.ArrayIndexOutOfBoundsException: length=5120; index=-2
at androidx.compose.runtime.SlotTableKt.groupSize(SlotTable.kt:2558)
at androidx.compose.runtime.SlotTableKt.access$groupSize(SlotTable.kt:1)
at androidx.compose.runtime.SlotReader.groupSize(SlotTable.kt:596)
at androidx.compose.runtime.ComposerImpl.recomposeToGroupEnd(Composer.kt:2215)
at androidx.compose.runtime.ComposerImpl.skipCurrentGroup(Composer.kt:2499)
at androidx.compose.runtime.ComposerImpl.recompose$runtime_release(Composer.kt:2625)
at androidx.compose.runtime.CompositionImpl.recompose(Composition.kt:406)
at androidx.compose.runtime.Recomposer.performRecompose(Recomposer.kt:724)
Vivek Sharma
03/04/2021, 8:01 PMTextField
inside Dialog
, when I close the dialog , app crashes saying
java.lang.ArrayIndexOutOfBoundsException: length=5120; index=-2
at androidx.compose.runtime.SlotTableKt.groupSize(SlotTable.kt:2558)
at androidx.compose.runtime.SlotTableKt.access$groupSize(SlotTable.kt:1)
at androidx.compose.runtime.SlotReader.groupSize(SlotTable.kt:596)
at androidx.compose.runtime.ComposerImpl.recomposeToGroupEnd(Composer.kt:2215)
at androidx.compose.runtime.ComposerImpl.skipCurrentGroup(Composer.kt:2499)
at androidx.compose.runtime.ComposerImpl.recompose$runtime_release(Composer.kt:2625)
at androidx.compose.runtime.CompositionImpl.recompose(Composition.kt:406)
at androidx.compose.runtime.Recomposer.performRecompose(Recomposer.kt:724)
Timo Drick
03/05/2021, 7:48 AMSe7eN
03/05/2021, 9:12 AMTimo Drick
03/05/2021, 9:47 AMVivek Sharma
03/05/2021, 12:16 PMMBegemot
03/10/2021, 6:03 PMTimo Drick
03/11/2021, 11:36 AM@Composable
fun SetTimerDialog(currentSeconds: Int, newSecondsSet: (seconds: Int?) -> Unit) {
var textValue by remember { mutableStateOf(currentSeconds.toString()) }
Box(Modifier.fillMaxSize().zIndex(10f).background(Color.Black.copy(alpha = 0.75f)), contentAlignment = Alignment.Center) {
Surface(shape = MaterialTheme.shapes.medium) {
Column(Modifier.padding(16.dp)) {
Text("Set count down in seconds.", Modifier.padding(bottom = 4.dp))
TextField(
value = textValue,
onValueChange = { textValue = it },
keyboardOptions = KeyboardOptions(
autoCorrect = false,
keyboardType = KeyboardType.Number,
imeAction = ImeAction.Done
),
keyboardActions = KeyboardActions(onAny = { newSecondsSet(textValue.toInt()) })
)
}
}
}
}