Bacho Kurtanidze
11/27/2019, 12:07 PMRoar Gronmo
11/29/2019, 12:57 PMContainer(
width = 40.dp,
height = 40.dp
) {
DrawImage(image)
}
RGnglauber
12/02/2019, 5:11 AMTextField
?
TextField(
value = text.value,
keyboardType = KeyboardType.Text,
imeAction = ImeAction.Done,
onImeActionPerformed = {
// TODO how to close the keyboard?
},
onValueChange = { s -> text.value = s }
)
Slackbot
12/02/2019, 5:15 AMRoar Gronmo
12/02/2019, 10:50 AMRoar Gronmo
12/02/2019, 1:35 PMnglauber
12/02/2019, 10:57 PMText(
text = "H4 Primary!",
style = +themeTextStyle {
h4.copy(
color = +themeColor {
primary
}
)
}
)
Roar Gronmo
12/03/2019, 1:12 PMkapt 'androidx.room:room-compiler:2.2.2'
):
e: java.lang.NoSuchMethodError: org.jetbrains.kotlin.codegen.state.GenerationState$Builder.isIrBackend(Z)Lorg/jetbrains/kotlin/codegen/state/GenerationState$Builder;
at org.jetbrains.kotlin.kapt3.AbstractKapt3Extension.contextForStubGeneration(Kapt3Extension.kt:267)
at org.jetbrains.kotlin.kapt3.AbstractKapt3Extension.analysisCompleted(Kapt3Extension.kt:164)
at org.jetbrains.kotlin.kapt3.ClasspathBasedKapt3Extension.analysisCompleted(Kapt3Extension.kt:98)
at org.jetbrains.kotlin.cli.jvm.compiler.TopDownAnalyzerFacadeForJVM$analyzeFilesWithJavaIntegration$2.invoke(TopDownAnalyzerFacadeForJVM.kt:97)
at org.jetbrains.kotlin.cli.jvm.compiler.TopDownAnalyzerFacadeForJVM.analyzeFilesWithJavaIntegration(TopDownAnalyzerFacadeForJVM.kt:107)
at org.jetbrains.kotlin.cli.jvm.compiler.TopDownAnalyzerFacadeForJVM.analyzeFilesWithJavaIntegration$default(TopDownAnalyzerFacadeForJVM.kt:82)
at org.jetbrains.kotlin.cli.jvm.compiler.KotlinToJVMBytecodeCompiler$analyze$1.invoke(KotlinToJVMBytecodeCompiler.kt:558)
at org.jetbrains.kotlin.cli.jvm.compiler.KotlinToJVMBytecodeCompiler$analyze$1.invoke(KotlinToJVMBytecodeCompiler.kt:85)
at org.jetbrains.kotlin.cli.common.messages.AnalyzerWithCompilerReport.analyzeAndReport(AnalyzerWithCompilerReport.kt:107)
at org.jetbrains.kotlin.cli.jvm.compiler.KotlinToJVMBytecodeCompiler.analyze(KotlinToJVMBytecodeCompiler.kt:549)
at org.jetbrains.kotlin.cli.jvm.compiler.KotlinToJVMBytecodeCompiler.compileModules$cli(KotlinToJVMBytecodeCompiler.kt:180)
at org.jetbrains.kotlin.cli.jvm.K2JVMCompiler.doExecute(K2JVMCompiler.kt:172)
at org.jetbrains.kotlin.cli.jvm.K2JVMCompiler.doExecute(K2JVMCompiler.kt:56)
at org.jetbrains.kotlin.cli.common.CLICompiler.execImpl(CLICompiler.kt:85)
at org.jetbrains.kotlin.cli.common.CLICompiler.execImpl(CLICompiler.kt:43)
at org.jetbrains.kotlin.cli.common.CLITool.exec(CLITool.kt:104)
at org.jetbrains.kotlin.incremental.IncrementalJvmCompilerRunner.runCompiler(IncrementalJvmCompilerRunner.kt:349)
at org.jetbrains.kotlin.incremental.IncrementalJvmCompilerRunner.runCompiler(IncrementalJvmCompilerRunner.kt:105)
at org.jetbrains.kotlin.incremental.IncrementalCompilerRunner.compileIncrementally(IncrementalCompilerRunner.kt:237)
at org.jetbrains.kotlin.incremental.IncrementalCompilerRunner.access$compileIncrementally(IncrementalCompilerRunner.kt:37)
at org.jetbrains.kotlin.incremental.IncrementalCompilerRunner$compile$2.invoke(IncrementalCompilerRunner.kt:79)
at org.jetbrains.kotlin.incremental.IncrementalCompilerRunner.compile(IncrementalCompilerRunner.kt:91)
at org.jetbrains.kotlin.daemon.CompileServiceImplBase.execIncrementalCompiler(CompileServiceImpl.kt:606)
at org.jetbrains.kotlin.daemon.CompileServiceImplBase.access$execIncrementalCompiler(CompileServiceImpl.kt:99)
at org.jetbrains.kotlin.daemon.CompileServiceImpl.compile(CompileServiceImpl.kt:1645)
at sun.reflect.GeneratedMethodAccessor101.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:357)
at sun.rmi.transport.Transport$1.run(Transport.java:200)
at sun.rmi.transport.Transport$1.run(Transport.java:197)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.Transport.serviceCall(Transport.java:196)
at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:573)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:834)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.lambda$run$0(TCPTransport.java:688)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:687)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:kaptGenerateStubsDebugKotlin'.
> Internal compiler error. See log for more details
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at <https://help.gradle.org>
BUILD FAILED in 2s
Here's the issuetracker node for this one: https://issuetracker.google.com/145557605
RGJan Lund
12/03/2019, 1:51 PMnglauber
12/04/2019, 11:34 PMitnoles
12/05/2019, 1:59 AMRoar Gronmo
12/06/2019, 10:02 AMdev03
changes and I am little bit wondered why the quite good structuring in dev02
has been "abandoned" with "parameters" (here: modifiers):
//dev02
@Composable
private fun BottomBarAction(
@DrawableRes id: Int,
onClick: () -> Unit
) {
Ripple(
bounded = false,
radius = 24.dp
) {
Clickable(onClick = onClick) {
Padding(12.dp) {
Container(width = 24.dp, height = 24.dp) {
DrawVector(+vectorResource(id))
}
}
}
}
}
//dev03
@Composable
private fun BottomBarAction(
@DrawableRes id: Int,
onClick: () -> Unit
){
Ripple(
bounded = false,
radius = 24.dp
){
Clickable(onClick = onClick) {
Container(modifier = Spacing(12.dp) wraps Size(24.dp, 24.dp)) {
DrawVector(vectorImage = +vectorResource(id))
}
}
}
}
Before I felt i had control over the layout structure, but now Padding
has become a Spacing
modifier
whics wraps
a Size
.. ?
I somehow lost the control here. Or is there fear that the structuring will become too deep in complex layouts, and therefore it is parameterized, or is the situation simply that there are several parallel layers of structuring -> causing the parameterization.
RGRoar Gronmo
12/06/2019, 10:37 AMRoar Gronmo
12/06/2019, 11:25 AM@Lambda
annotation in front of the function which should intendly be the lambda function.
i.e.:
private fun BottomBar(
post: Post,
@Lambda onUnimplementedAction: () -> Unit){
...
}
If it isn't already suggested before.
RGAndrew Kelly
12/06/2019, 12:27 PMnglauber
12/06/2019, 1:00 PMRoar Gronmo
12/06/2019, 1:43 PMOverload resolution ambiguity. All these functions match.
public fun Size(width: Dp, height: Dp): LayoutModifier defined in androidx.ui.layout
public inline fun Size(width: Dp, height: Dp): Size defined in androidx.ui.core
is this actually the same function ?kenkyee
12/07/2019, 2:21 PMRoar Gronmo
12/07/2019, 3:46 PMkenkyee
12/08/2019, 3:52 AMRoar Gronmo
12/08/2019, 12:48 PMAdriano Celentano
12/08/2019, 1:50 PM```with(+memo { DrawShapeCacheHolder() }) {
lastShape = shape
Draw { canvas, parentSize ->
...
}
efemoney
12/09/2019, 11:34 AMRoar Gronmo
12/09/2019, 2:37 PMcrossAxisAlignment
(and mainAxisAlignment
) which we could sett to CrossAxisAlignement.End
( or MainAxisAlignment.End
)
I want to align thos two texts below to the right, how is that done in dev03 ?
Column(modifier = Spacing(right = 4.dp) )
{
Surface(color = Color.Blue) {
Text(text = "2019.12.09 12:00")
}
Surface(color = Color.Red) {
Text(text = "14d 16h 00min")
}
}
Isaac Udy
12/09/2019, 11:44 PMJames Richardson
12/10/2019, 11:40 AMColumn {
devices.map {
Text(text = it.name)
}
}
This fails:
Column {
devices.map(::device)
}
[...]
@Composable
private fun device(device: UpnpDevice) {
Text(text = device.name)
}
the stacktrace is:
2-10 11:39:52.827 3603-3603/? D/Error: ERR: stack=java.lang.IllegalStateException: Expected a group start
at androidx.compose.SlotTableKt.getAsGroupStart(SlotTable.kt:641)
at androidx.compose.SlotTableKt.access$getAsGroupStart$p(SlotTable.kt:1)
at androidx.compose.SlotEditor.recordStartGroup$compose_runtime_release(SlotTable.kt:150)
at androidx.compose.SlotReader.startGroup(SlotTable.kt:277)
at androidx.compose.SlotReader.startGroup(SlotTable.kt:273)
at androidx.compose.ComposerKt.start(Composer.kt:1791)
at androidx.compose.ComposerKt.access$start(Composer.kt:1)
at androidx.compose.Composer.start(Composer.kt:776)
at androidx.compose.Composer.startGroup(Composer.kt:397)
at androidx.compose.ObserveKt.Observe(Observe.kt:37)
at com.example.filecopier.FileCopierAppKt.device(FileCopierApp.kt)
at com.example.filecopier.FileCopierAppKt.access$device$0(FileCopierApp.kt)
at com.example.filecopier.FileCopierAppKt$fileCopierApp$1$2$invoke$1$2$invoke$1$1$invoke$1.invoke(FileCopierApp.kt:32)
at com.example.filecopier.FileCopierAppKt$fileCopierApp$1$2$invoke$1$2$invoke$1$1$invoke$1.invoke(FileCopierApp.kt)
at androidx.compose.ObserveKt.Observe(Observe.kt:39)
at com.example.filecopier.FileCopierAppKt$fileCopierApp$1$2$invoke$1$2$invoke$1$1.invoke(FileCopierApp.kt)
at com.example.filecopier.FileCopierAppKt$fileCopierApp$1$2$invoke$1$2$invoke$1$1.invoke(FileCopierApp.kt)
at androidx.ui.layout.FlexKt$Column$1$1$invoke$1.invoke(Flex.kt:362)
at androidx.ui.layout.FlexKt$Column$1$1$invoke$1.invoke(Flex.kt)
at androidx.compose.ObserveKt.Observe(Observe.kt:39)
at androidx.ui.layout.FlexKt$Column$1$1.invoke(Flex.kt)
at androidx.ui.layout.FlexKt$Column$1$1.invoke(Flex.kt)
I'm using the +observe
snippet previously posted...
any ideas much appreciated!
I should mention that the code works fine in the preview, so I'm guessing its something to do with the observe
Mark Haehnel
12/10/2019, 1:08 PMMaterialTheme() {
Card(color = +themeColor { secondary }) {
Text("Test")
}
}
On API 29 it looks like it should (First attached image 'API_29.png')
On API 28 the colors don't get applied and thus the foregound text color is broken too. (Second image 'API_28.png')
A little note to the images: Look at the top "tab" bar. The white cards with black text are OK, the ones where the green background is missing are broken.Geert
12/10/2019, 11:00 PMsetContent
en Text
functions wont work/import. I tried to import gradle as using api/implementation, am I missing something? Dependencies:
implementation 'androidx.ui:ui-layout:0.1.0-dev03'
implementation 'androidx.ui:ui-material:0.1.0-dev03'
implementation 'androidx.ui:ui-tooling:0.1.0-dev03'
Roar Gronmo
12/11/2019, 9:16 PMFudge
12/11/2019, 10:56 PMcompose-runtime
has lost the dependency on android.*
😮Fudge
12/11/2019, 10:56 PMcompose-runtime
has lost the dependency on android.*
😮ui-text
is so close to not using android.*
, there's just one tiny Log.w
call 😆Louis Pullen-Freilich [G]
12/11/2019, 11:13 PMcompose-runtime
still has a lot of android dependencies 🙂 It's just a multiplatform module, so we split out the common / android specific implementations, to enable host-side testing in the future.Fudge
12/11/2019, 11:18 PM