Questions tagged [compose-multiplatform]

79 questions
46
votes
4 answers

Android: Jetpack Compose and XML in Activity

How can I add Jetpack Compose & xml in the same activity? An example would be perfect.
13
votes
3 answers

How can I implement a timer in a portable way in Jetpack Compose?

There's applications I'd like to write where I'd like some things to occur on a schedule. Polling a URL for updates every few minutes seems to be a fairly common use case. In this particular case, though, I'm just trying to implement a clock. This…
6
votes
1 answer

How to clear focus of BasicTextField upon clicking somewhere else in Compose Multiplatform?

I have a BasicTextField in Jetbrains Compose Multiplatform for desktop. When I click on it, the TextField gets focus and becomes editable. However, when I click somewhere else in my application, the focus is not lost and the field is still editable…
5
votes
0 answers

Styling Compose for Desktop Tray Composable

I've been playing around with Compose for Desktop, and I am trying to figure out how Jetbrain styled the Tray Composable. I am assuming that's what they used to build the Jetbrains Toolbox since they wrote a post about how they migrated the Toolbox…
5
votes
2 answers

Bundle files with Compose for Desktop (Compose Multiplatform)

I am an Android developer and I have experience with Jetpack Compose. Now, I am trying to build desktop apps, so I found this Compose for Desktop project. I want to store a JSON file with my desktop app so that I can read the file from my desktop…
4
votes
3 answers

Using fonts in a Compose Multiplatform project

I am looking for a way to easily use custom fonts in a Compose Multiplatform project. I found that we need to use Font from the androidx.compose.ui.text.platform.Font package. But this object takes in parameter data: ByteArray. Until now, I haven't…
Vince
  • 2,551
  • 1
  • 17
  • 22
4
votes
1 answer

Gradle, use material3 in a compose multiplatform project

I'm doing a project with Jetpack Compose Multiplatform Desktop. I'm not very familiar with Gradle, and I would like to use Material 3 in my project. So, I added this line in build.gradle.kts…
wiiznokes3
  • 91
  • 8
3
votes
1 answer

Can't use PHPickerViewController delegate with KMM

I'm trying to use the UiKit API PHPickerViewController using KMM and Compose for iOS. import androidx.compose.runtime.Composable import androidx.compose.ui.interop.LocalUIViewController import platform.PhotosUI.PHPickerConfiguration import…
Nico
  • 2,570
  • 1
  • 9
  • 17
3
votes
0 answers

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. ----------- * What went wrong: Execution failed for…
3
votes
1 answer

Can't use implicit or explicit receiver when inside Box scope

I'm learning Jetbrains' "Compose Multiplatform" which is based on Jetpack Compose. Some info Kotlin: 1.5.31 Intellij: 2021.3.1 So when building the code below I get the error: fun Modifier.align(alignment: Alignment.Horizontal): Modifier' can't be…
TeddyBearSuicide
  • 1,377
  • 1
  • 6
  • 11
3
votes
0 answers

Compose Multiplatform enable "shift+scroll" zoom

I'm displaying a Box which contains a tree structure in Compose Multiplatform. Now I wanted to scale the Box so the user can zoom and scroll to the important section of the tree Scroll is no Problem, but I have no Idea how to implement a zoom…
3
votes
1 answer

How to animate elements of a dynamic list in Jetpack Compose?

How can I transition elements of a list to the new list (possibly different size) with animation? I have a pie chart and when its slices (fractions) change, I want to animate the previous fractions to the new fractions. The thing is, number of…
2
votes
1 answer

How to use ObjectBox database into compose multiplatform project?

The object-box database offers a very easy way of implementation for both android and jvm projects. It has clear-text documentation for these purposes. But problem arises when I try to use it into a multiplatform project. There are no problems with…
2
votes
2 answers

Could not found kotlinx-atomicfu Compose Multiplatform iOS

I am trying to build the project that I have cloned from the repository compose-multiplatform-ios-android-template of JetBrains. The code was running fine on Android but throws an error on iOS. I also tried to update the cocoapods. Still, this gives…
2
votes
0 answers

Accessibility in Compose Multiplatform for iOS platform is not working

While working on the Compose KMM implementation, I found an issue with the accessibility. The Compose Multiplatform doesn’t support the accessibility directly. I tried to implement the accessibility in the respective platform module and send the…
1
2 3 4 5 6