David Dupraz
06/23/2021, 1:25 PMChristian Babsek
06/23/2021, 2:50 PMDaniele B
06/25/2021, 11:05 AMTheMrCodes
06/25/2021, 8:24 PMDaniele B
06/25/2021, 8:28 PMBackHandler
composable too). All the rest is identical, as they are pure layout, with NO(!) AACViewModel/AndroidNavigation/DI dependencies whatsoever.
My idea was to actually create an additional multiplatform project directory “*composables*”:
/_*composables*/commonMain_
*/composables*/androidMain
*/composables*/desktopMain
just for composables shared by Android and Desktop, but I found it incredible hard, as Gradle doesn’t seem to like me.
If there is anyone here who understands Gradle and the JetBrains Compose plugin very well, and has 15 minutes to spare to move the composables to their own separate project, it would be very appreciated.Akram Bensalem
06/26/2021, 1:26 PMJimmy
06/26/2021, 5:00 PMDaniele B
06/27/2021, 11:05 AMorg.jetbrains.compose
, while the actual package is androidx.compose
. Is there a plan to make domain names more consistent?David Dupraz
06/28/2021, 6:49 PMAkram Bensalem
06/29/2021, 5:08 PMJustin Yue
06/29/2021, 8:22 PMProcess 'command '/home/jay/.jdks/azul-15.0.3/bin/java'' finished with non-zero exit value 134
Update: I also tried pulling the desktop template from the jetbrains-compose repository and am still getting the same error. If it helps, the Kotlin version is also 1.5.10, but I had to install it from a plugin download since I had accidentally updated from 1.4.32 to 1.5.20.Akram Bensalem
06/29/2021, 10:48 PMB bis
06/30/2021, 11:30 AMNik
06/30/2021, 6:32 PMJavier
07/01/2021, 9:08 AMolonho
07/01/2021, 9:26 AM0.5.0-build229
we implemented new experimental feature we’d like people to experiment with and help us to get improved. Namely basic non-interactive preview. To use, switch to 0.5.0-build229
and add implementation(compose.uiTooling)
into dependencies
block. Then install IDE plugin from https://plugins.jetbrains.com/plugin/16541-compose-multiplatform-ide-support/versions/alpha/125571. Add @Preview
annotation to argument-less @Composable
function and you’ll have gutter like shown below. Click it and function preview could be seen in “Desktop Preview” pane of IDEA. Thanks to @alexey.tsvetkov for getting that up and running! Known issues:
• put function with @Preview
to file where no main()
function exists, as it conflicts with run configuration. We plan to fix it soon.
• preview creates stale run configurations. We plan to fix it soon.
• preview pane doesn’t look eye candy
• running preview requires two clicks
• no automated re-running of preview on code change
Anyway, share your experience, and maybe help with improvements, code is at https://github.com/JetBrains/compose-jb/tree/master/idea-pluginolonho
07/01/2021, 10:31 AM0.5.0-build229
is support of linux-arm64 in Compose, i.e Ubuntu 21.04 on Raspberry Pi 400 is known to work. And due to decent graphical hardware of this machine we can run using OpenGL hardware acceleration. See video below.olonho
07/01/2021, 10:33 AMrcd27
07/01/2021, 1:23 PMColumn
, there are some elements in it, but I need the last one to be at the bottom of the screen. Weights working bad (good on preview, but collapses button on device):
Any ideas, guys?David Dupraz
07/02/2021, 10:05 AMdimitar_
07/03/2021, 10:12 AM0.5.0-build229
I get an exception, because I have set size
in the `Windows`’s state
Window(onCloseRequest = {}, undecorated = true, resizable = false, state = WindowState(size = WindowSize(400.dp, 200.dp)))
The exception:
Trying METAL rendering...
Exception in thread "main" java.awt.IllegalComponentStateException: The window is showing on screen.
at java.desktop/java.awt.Window.setLocationByPlatform(Window.java:3478)
at androidx.compose.ui.util.Windows_desktopKt.setLocationByPlatformSafely(Windows.desktop.kt:94)
at androidx.compose.ui.util.Windows_desktopKt.setPositionSafely(Windows.desktop.kt:66)
at androidx.compose.ui.util.Windows_desktopKt.setPositionSafely(Windows.desktop.kt:50)
at androidx.compose.ui.window.Window_desktopKt$Window$5$1$9.invoke(Window.desktop.kt:183)
at androidx.compose.ui.window.Window_desktopKt$Window$5$1$9.invoke(Window.desktop.kt:183)
at androidx.compose.ui.util.ComponentUpdater$UpdateScope.set(ComponentUpdater.kt:40)
at androidx.compose.ui.window.Window_desktopKt$Window$5$1.invoke(Window.desktop.kt:183)
at androidx.compose.ui.window.Window_desktopKt$Window$5$1.invoke(Window.desktop.kt:174)
at androidx.compose.ui.util.ComponentUpdater.update(ComponentUpdater.kt:27)
at androidx.compose.ui.window.Window_desktopKt$Window$5.invoke(Window.desktop.kt:174)
at androidx.compose.ui.window.Window_desktopKt$Window$5.invoke(Window.desktop.kt:173)
at androidx.compose.ui.window.AwtWindow_desktopKt$AwtWindow$3.invoke(AwtWindow.desktop.kt:87)
at androidx.compose.ui.window.AwtWindow_desktopKt$AwtWindow$3.invoke(AwtWindow.desktop.kt:86)
at androidx.compose.ui.util.UpdateEffect_desktopKt$UpdateEffect$2$performUpdate$2.invoke(UpdateEffect.desktop.kt:58)
at androidx.compose.ui.util.UpdateEffect_desktopKt$UpdateEffect$2$performUpdate$2.invoke(UpdateEffect.desktop.kt:57)
at androidx.compose.runtime.snapshots.Snapshot$Companion.observe(Snapshot.kt:1788)
at androidx.compose.runtime.snapshots.SnapshotStateObserver.observeReads(SnapshotStateObserver.kt:119)
at androidx.compose.ui.util.UpdateEffect_desktopKt$UpdateEffect$2.invoke$performUpdate(UpdateEffect.desktop.kt:54)
at androidx.compose.ui.util.UpdateEffect_desktopKt$UpdateEffect$2.access$invoke$performUpdate(UpdateEffect.desktop.kt:47)
at androidx.compose.ui.util.UpdateEffect_desktopKt$UpdateEffect$2$performUpdate$1$1.invoke(UpdateEffect.desktop.kt:56)
at androidx.compose.ui.util.UpdateEffect_desktopKt$UpdateEffect$2$performUpdate$1$1.invoke(UpdateEffect.desktop.kt:56)
at androidx.compose.ui.util.UpdateEffect_desktopKt$UpdateEffect$1.invokeSuspend(UpdateEffect.desktop.kt:43)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
at java.desktop/java.awt.event.InvocationEvent.dispatch$$$capture(InvocationEvent.java:316)
at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java)
at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:770)
at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:721)
at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:715)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:391)
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:740)
at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)
Any pointers?
If I remove the state = WindowState
everything is ok.Irfan
07/03/2021, 1:41 PMgbaldeck
07/03/2021, 4:06 PMremember
supposed to be usable with the by
keyword like below?
var loadingState by remember { mutableStateOf(Startup.LOADING) }
I am not able to use it most of the time and the IDE reports the error:
Type 'TypeVariable(T)' has no method 'getValue(Nothing?, KProperty<*>)' and thus it cannot serve as a delegate
In compose examples I see remember
used with the by
keyword, am I missing something?
Here's my imports:
import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.remember
SrSouza
07/04/2021, 3:23 AMSrSouza
07/04/2021, 7:01 PMsaket
07/05/2021, 3:56 AMRichard Robinson
07/05/2021, 1:44 PMRichard Robinson
07/05/2021, 10:37 PMSwingPanel
adopt a speciifc Look and Feel? I tried using UIManager
to set it, but it doesn’t appear to have any effectTheMrCodes
07/06/2021, 12:15 PMSelectionRegistrar
) internal and not accessible for everyone?Stefan Oltmann
07/06/2021, 12:22 PM