David W
03/08/2022, 4:11 AM../HelloWorld.exe
, then try to launch the exe. It doesn't launch. Move the jre, and it will launch.
CfD bug or some expected interaction?Stefan Oltmann
03/08/2022, 3:39 PMDavid W
03/09/2022, 3:26 AMMaxUt
03/09/2022, 9:24 AMmikehearn
03/09/2022, 3:02 PMmikehearn
03/09/2022, 3:03 PMMichael Paus
03/10/2022, 6:49 PMtherealbluepandabear
03/14/2022, 3:35 AMTrammel May
03/15/2022, 10:25 PMAlex
03/18/2022, 10:23 AMJasin Colegrove
03/18/2022, 11:47 AMKebbin
03/19/2022, 7:12 AMmcpiroman
03/19/2022, 8:49 AM1.2.0-alpha01-dev646
contain bug-fixes the 1.1(.1) has?Balaviknesh Sekar
03/22/2022, 3:31 PMChristian Babsek
03/24/2022, 7:04 PMXad Kile
03/25/2022, 5:12 AMmyComposeTestRule.onNodeWithTag("b").performKeyPress(someKeyEvent)
And I have no idea how to create a KeyEvent. Maybe I have overlooked something, but I haven't found anything or an example showing how to do that. Any direction is appreciated, thank you :DAlexander Maryanovsky
03/25/2022, 7:28 AMval scrollbarAdapter = rememberScrollbarAdapter(state)
// We check before adding it because VerticalScrollbar always stretches the containing box to fill the entire
// available space. Even if we add BoxScope.matchParentSize to its modifier.
if (showVerticalScrollbar && (scrollbarAdapter.maxScrollOffset(containerHeight) > 0)){
VerticalScrollbar(
adapter = scrollbarAdapter,
reverseLayout = reverseLayout,
modifier = Modifier.align(Alignment.CenterEnd)
)
}
But due to the call to maxScrollOffset
this keeps recomposing continuously, taking around 50% cpu time, and apparently even leaks memory, because eventually the app crashes on OutOfMemoryError
Fureeish
04/02/2022, 9:18 PM@Composable
fun TableCell(
text: String,
) {
Text(
text = text,
Modifier
.border(1.dp, Color.Black)
.padding(8.dp)
)
}
@Composable
fun tableView(
headers: List<String>,
rows: List<List<String>>,
padding: Dp = 16.dp,
) {
val scrollState = rememberLazyListState()
val coroutineScope = rememberCoroutineScope()
val draggableState = rememberDraggableState { delta ->
coroutineScope.launch {
scrollState.scrollBy(-delta)
}
}
LazyColumn(Modifier.padding(padding)) {
item {
LazyRow(
state = scrollState,
modifier = Modifier.draggable(
orientation = Orientation.Horizontal,
state = draggableState
)
) {
for (column in headers) {
item {
TableCell(column)
}
}
}
}
for (row in rows) {
item {
LazyRow(
state = scrollState,
modifier = Modifier.draggable(
orientation = Orientation.Horizontal,
state = draggableState
)
) {
for (element in row) {
item {
TableCell(element)
}
}
}
}
}
}
}
fun main() = application {
Window(onCloseRequest = ::exitApplication) {
val oneToHundred = (0..100)
tableView(
oneToHundred.map(Int::toString),
oneToHundred.map { oneToHundred.mapIndexed { i, _ -> "$i" }})
}
}
The bug manifests itself when I try to drag over the "table". Only one of the rows gets correctly and smoothly dragged, while the rest of them stays still. This doesn't look very good. However, after scrolling vertically (sometimes I have to scroll to hide every row that was visible while I was dragging), the "table" correctly adjusts all of its rows to match the drag.
I am not yet sure if that's just my machine playing tricks on me (I have a history of my hardware handling Compose incorrectly) or if that's a solution that's hacky enough that it will not just work smoothly. Can someone please comment on the above code in terms of its correctness (both in terms of functionality and philosophy of Compose)?james
04/05/2022, 1:52 AMxxfast
04/07/2022, 12:49 AM@Preview
support within library modules? Previews only seems to be working on android modulesDave Leeds
04/08/2022, 10:47 PMspierce7
04/09/2022, 2:29 PM$fileName.min.jar
, but if I do ${hash(fileName).toHex()}.jar
I end up in headless mode for some reason.
I’ve checked anything I can think of? Any theories that anyone can suggest?Jan
04/13/2022, 3:18 PMPaul N
04/15/2022, 8:56 PMCaused by: java.lang.AbstractMethodError: Receiver class androidx.compose.compiler.plugins.kotlin.ComposeComponentRegistrar does not define or inherit an implementation of the resolved method 'abstract void registerProjectComponents(com.intellij.mock.MockProject, org.jetbrains.kotlin.config.CompilerConfiguration)' of interface org.jetbrains.kotlin.compiler.plugin.ComponentRegistrar.
versions are :
plugins {
kotlin("jvm") version "1.6.10"
id("org.jetbrains.compose") version "1.1.1"
}
I've tried all sorts of combinations of kotlin and compose versions, but with no joy. This error is when trying to run in IntelliJIlya Kalibrov [JB]
04/18/2022, 10:43 AMRemo
04/20/2022, 8:13 PMThomas
04/22/2022, 1:18 PMTunji Dahunsi
04/22/2022, 2:56 PM1.2.0-alpha01-dev667
and so on), I routinely get this crash:
java.lang.NoSuchMethodError: <init>
at org.jetbrains.skia.impl.Library._nAfterLoad(Native Method)
at org.jetbrains.skia.impl.Library$Companion._nAfterLoad(Library.jvm.kt)
at org.jetbrains.skiko.Library.load(Library.kt:66)
at org.jetbrains.skia.impl.Library$Companion.staticLoad(Library.jvm.kt:12)
at androidx.compose.ui.ConfigureSwingGlobalsForCompose_desktopKt.configureSwingGlobalsForCompose(ConfigureSwingGlobalsForCompose.desktop.kt:49)
at androidx.compose.ui.ConfigureSwingGlobalsForCompose_desktopKt.configureSwingGlobalsForCompose$default(ConfigureSwingGlobalsForCompose.desktop.kt:38)
at androidx.compose.ui.window.Application_desktopKt.application(Application.desktop.kt:110)
at androidx.compose.ui.window.Application_desktopKt.application$default(Application.desktop.kt:105)
I can fix it with an explicit dependency on
implementation("org.jetbrains.skiko:skiko-awt-runtime-$target:$version")
But this is a bit difficult as target
has to be resolved at runtime. I haven't been able to find a multiplatform compatible maven coordinate for that dependency. Is there one?Guilherme Delgado
04/22/2022, 7:16 PMGuilherme Delgado
04/23/2022, 10:24 AMmodifier = Modifier
.fillMaxWidth()
.drawWithCache {
val gradient = Brush.horizontalGradient(colors = listOf(Color.DarkGray, Color.Transparent, Color.DarkGray))
onDrawWithContent {
drawContent()
drawRect(
brush = gradient,
size = size,
blendMode = BlendMode.Darken
)
}
}
In the preview this is rendered correctly, when running the app it’s not, it only draws the Rect “ignoring” the composable in the background. Any idea? 🤔