-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support common org.jetbrains.compose.ui.tooling.preview.Preview
in IDEA and Android Studio
#5078
Comments
Parent task: #2045 |
Is it possible to render Android previews from commonMain if android target is enabled? Desktop previews lack features such as device sizes, light/dark, interactive mode, layout inspector, animations, etc. It could be very nice if a common |
At the moment, it isn't possible officially. There can be workarounds, but I haven't checked them. A current working official (but cumbersome) way is defining your android-only |
@igordmn How soon can we expect this feature to arrive? Is there any plan? |
Thanks, that's what I have been doing. The problem is it separates code and previews, making it hard for collaborators to find them. A separate IDE tab is also needed. Switching between tabs is frustrating. Common |
Just came here to see if anything changed after several month, unfortunately no. I just want to write UI and see preview right in the same file.. |
How could fleet support commonMain preivew? That's strange. |
yes i did the same but it is not showing preview like jetpack compose does in android. when i did like you said preview runs on emulator not showing in side by side |
You can check how it is done in https://kmp.jetbrains.com/: The important parts are in
|
yes this worked fine. can you help me little more as i am using common resource in kmp. when i use any drawable from common resource render gets fail |
Maybe this is what you encounter. Try the latest |
@igordmn sorry for asking again, but is there any time frame when we can expect Preview to work in commonMain in IDEA/AS? For me this is a quite important feature that stops me from using CMP more. |
We don't have public ETA |
Please check the following ticket on YouTrack for follow-ups to this issue. GitHub issues will be closed in the coming weeks. |
Fleet compose preview only work for fun App()? |
It support all composable function |
This is unfair on Jetbrains part where they are trying to upsell Fleet so that all compose multiplatform devs switch to Fleet. So now not only do I need to learn multiplatform coding, I need to learn how to use Fleet (which is going to be a Paid tool like Intellij) I am still stuck where it gives the "missing resource" error (my previews are in I ended up copying ALL my vector drawables to |
On top of that fleet laggy as hell, drains battery and loads cpu |
State on 08-07-2024 (Compose 1.6.11):
org.jetbrains.compose.ui.tooling.preview.Preview
(inimplementation(compose.components.uiToolingPreview)
)The text was updated successfully, but these errors were encountered: