81 questions
2
votes
1
answer
184
views
How to include and play a Lottie animation in Compose Multiplatform?
How can I embed After Effects animations exported with Bodymovin extension as Lottie JSON format in a Compose Multiplatform app (Desktop/Windows/Linux/macOS, Android, iOS, Web/JS/WASM)? Is there a ...
0
votes
0
answers
44
views
How can we get the exif data from a stored image?
If yes, will the exif data changes when we down scale the file? I've tried this:
val file = File(cacheDir, SAMPLE_IMAGE)
val ei = ExifInterface(file.path)
exifInterface.getAttribute(ExifInterface....
3
votes
4
answers
8k
views
"Compose Compiler requires Kotlin version" in Expo Bare Workflow
I'm using ReactNative with Expo, trying to build my release version in bare workflow with command :
./gradlew assembleRelease
I've got this error:
e: This version (1.5.14) of the Compose Compiler ...
1
vote
1
answer
507
views
How to show OS splash screen on startup of a Compose Multiplatform app?
JVM (Java/Kotlin) apps take a little time to start and be presented to the user.
There may be various "tricks" to show a splash screen when the app is being loaded.
My main purpose for ...
1
vote
0
answers
297
views
In compose-web production I only see a completely white screen
After gradle wasmJsBrowserDistribution command,I uploaded the files contained in the composeApp/build/dist/wasmJs/productionExecutable folder on my Aruba server but the page is completely white, I ...
0
votes
1
answer
98
views
When distributing Compose Multiplatform dmg, it seems to miss javax.script
My desktop app use the ScriptEngine to do something, which I know ScriptEngine is removed after JDK 11.
So I added a dependency like this:
implementation("org.openjdk.nashorn:nashorn-core:15.3&...
2
votes
2
answers
119
views
@composable invocations can only happen from the context of a @composable function while work around lack of desktop support for moko:biometry-compose
I am trying to work around the lack of desktop support from dev.icerock.moko:biometry-compose, I am not able to compile desktop version while this library is a part of commonMain. The idea is to push ...
1
vote
3
answers
546
views
Add custom Gradle task after packaging of Compose Desktop app
I'm building a desktop application with Jetpack Compose and found that when I package the app for macOS, it requires a manual step to set executable permission on the app binary. To remove this manual ...
2
votes
1
answer
864
views
How do I keep my compose multiplattform app on top of fullscreen program?
I am developing a desktop app using JetBrains Compose Multiplattform which i want to overlay over all my active applications.
It works over non-Fullscreen programs using just the following code:
fun ...
4
votes
1
answer
465
views
Jetpack compose for desktop: run application as administrator on windows?
I am trying out Jetpack Compose for Desktop for the first time.
My app requires executing some external commands that require admin privilege.
How do I make the exe open as administrator when launched ...
0
votes
1
answer
536
views
How to implement inter-window DND (drag and drop) in Jetpack Compose Desktop?
I know I can use Swing and AWT with Jetpack Compose Desktop to try to implement it, but I have never worked with them and want to use Jetpack Compose elements only (design of tabs).
Could you help me ...
1
vote
1
answer
598
views
How to reset app data in KMP Desktop App?
I used to be an Android developer. Usually, I use "Clear Data" or "Clear Cache" in App Info to clear the data for my Android App (Usually to reset login, database, etc.)
How can I ...
3
votes
2
answers
644
views
Compose Multiplatform Desktop executes with run but fails with runDistributable
I created an application with Kotlin Multiplatform, for desktop (only).
The application works great when I do ./gradlew run but fails when I do ./gradlew runDistributable giving:
Exception in thread &...
1
vote
2
answers
2k
views
How do I access and modify a state from a non-Composable function?
I have this Composable function that holds multiple states:
@Composable
fun MyComponent() {
var stringState by remember { mutableStateOf("foo") }
var booleanState by remember { ...
8
votes
3
answers
457
views
Determine position (x, y) of specific system tray icon
I'm working on a desktop application using Jetbrains Compose, but I'm open to solutions using Swing (it's used under the hood) as well. I want to implement a feature where the application window is ...
4
votes
0
answers
880
views
How to select all text inside a SelectionContainer in Jetpack Compose?
Consider a LazyColumn inside a SelectionContainer that contains some composables like this:
SelectionContainer {
LazyColumn {
repeat(50) { n ->
item {
Row {
Text(&...
3
votes
0
answers
802
views
Facing issue while adding jetbrains-compose for iOS
Im following the template provided here by Jetbrains for adding compose to iOS and android and facing following issue:
FAILURE: Build completed with 4 failures.
1: Task failed with an exception.
-----...
1
vote
1
answer
637
views
AnimatedImage in compose multiplatform giving NoClassDefFoundError on Android but works on Desktop
I am using the AnimatedImage class in the compose multiplatform components library. It works perfectly to show a gif on Desktop but when I run this code on Android it crashes with this error:
java....
0
votes
2
answers
879
views
Jetpack Compose Animation skips to target value immediately
I'm trying to achieve a smooth animation of a simple round timer. Like this, but smoother
However it just skips to targetValue immediately and that's it there's no animation at all. I'm trying to do ...
8
votes
4
answers
3k
views
How to add uneditable postfix (suffix) to TextField in Jetpack Compose?
How can I add a suffix to TextField input that flows (moves) with the user input text?
2
votes
1
answer
2k
views
Make Text Selectable using the Mouse
I want to make the Text selectable using the mouse similar to the TextField.
SelectionContainer {
Text(
text = "Some very long text which can be selected by Mouse Left Press and drag to the ...
7
votes
3
answers
4k
views
How to trigger LaunchedEffect when mutableStateList is changed?
In Jetpack/Desktop Compose I want a coroutine to run in response to changes to a SnapshotStateList.
In this example:
import androidx.compose.foundation.layout.Column
import androidx.compose.material....
1
vote
0
answers
579
views
Compose for web: Uploading a file submitted via a multipart form
I am trying to upload a file from Compose for Web form using Ktor.
My server code is based on the example found in the Ktor repo:
https://github.com/ktorio/ktor-documentation/blob/2.1.0/codeSnippets/...
1
vote
0
answers
553
views
Efficient rendering of many Jetbrains Compose elements at absolute coordinates within a graphics layer
I am trying to render a large number of "nodes" in a freeform sandbox area with Jetbrains Compose. Each node has it's own X,Y position. The editor is in a graphicsLayer where it can be ...
1
vote
1
answer
1k
views
What is the best way to persist state in composable recreation in Jetpack Compose?
Consider we have the following structure in a toggling implementation scenario:
@Composable
fun RootComposable() {
var someAuxToggle by remember { mutableStateOf(false) }
if (someAuxToggle) {
...