Colton Idle
02/10/2021, 8:27 PMVsevolod Ganin
02/10/2021, 8:56 PMDisposableEffect
and LaunchedEffect
are essentially the same except that they use different methods to make the same thing: `DisposableEffect`’s block is blocking and disposes stuff with onDispose
and `LaunchedEffect`’s block is suspending and disposes stuff with scope.cancel()
?Arkadii Ivanov
02/10/2021, 9:58 PMalpha12
, the setContent
is now deprecated, so I added androidx.activity:activity-compose:1.3.0-alpha01
to the dependencies and updated the import. The build fails with the following error. Is there a fix for this?
Task :sample:counter:app-android:compileDebugKotlin FAILED
w: Flag is not supported by this version of the compiler: -Xallow-jvm-ir-dependencies
w: ATTENTION!
This build uses unsafe internal compiler arguments:
-XXLanguage:+NonParenthesizedAnnotationsOnFunctionalTypes
This mode is not recommended for production use,
as no stability/compatibility guarantees are given on
compiler or generated code. Use it at your own risk!
e: Classes compiled by an unstable version of the Kotlin compiler were found in dependencies. Remove them from the classpath or use '-Xallow-unstable-dependencies' to suppress errors
e: /home/aivanov/dev/workspace/Decompose/sample/counter/app-android/src/main/java/com/arkivanov/counter/app/MainActivity.kt: (39, 9): Class 'androidx.activity.compose.ComponentActivityKt' is compiled by an unstable version of the Kotlin compiler and cannot be loaded by this compiler
Ian Lake
02/10/2021, 10:01 PMKyant
02/11/2021, 1:46 AMmutableStateListOf().parallelStream().forEach {}
and coroutines to execute the items in parallel, but it seems some executions won't be run. And the missing executions are random.
Is there a solution?darkmoon_uk
02/11/2021, 1:51 AM1.4.30
/ Compose alpha12
, and setting:
kotlinOptions {
jvmTarget = "15"
...
...which appears necessary to use the new IR compiler in 1.4.30
darkmoon_uk
02/11/2021, 2:28 AMandroidx.lifecycle:lifecycle-viewmodel.compose:1.0.0-alpha01
but that package isn't published.darkmoon_uk
02/11/2021, 7:31 AMjava.lang.IllegalArgumentException: offset(4) is out of bounds [0, 3]
at androidx.compose.ui.text.MultiParagraph.requireIndexInRangeInclusiveEnd(MultiParagraph.kt:588)
at androidx.compose.ui.text.MultiParagraph.getCursorRect(MultiParagraph.kt:437)
...full trace in thread. This occurs after typing a few chars into the text-box. Bit hard to provide our code, but can say we are using a visual transformation which I suppose may affect cursor position / character indexing.Rafs
02/11/2021, 8:06 AM1.4.30
it seems my android studio is confused. Project is building and running though.rsktash
02/11/2021, 10:20 AMBenjO
02/11/2021, 10:53 AMalpha12
.
Last warning I have is Flag is not supported by this version of the compiler: -Xallow-jvm-ir-dependencies
.
Does anyone know why ? 🙏Vsevolod Ganin
02/11/2021, 11:17 AMPointerInputScope.detectDragGestures
is missing onDragStart
callback. DragObserver
had it and now it is deprecated in favor of PointerInputScope.detectDragGestures
. I could workaround this with boolean but it is quite inconvenient. Maybe another way?Vsevolod Ganin
02/11/2021, 12:00 PMFlingConfig
with new animateDecay
? Can’t see where to apply FlingConfig::adjustTarget
Denis
02/11/2021, 12:01 PMTlaster
02/11/2021, 12:22 PMclampedValue
is the actual result but never being usedDenis
02/11/2021, 2:47 PM.class
file, prompts to download sources, and then I get this:
Execution failed for task ':app:DownloadSources'.
> Could not resolve all files for configuration ':app:downloadSources_...'.
> Could not find androidx.compose.foundation:foundation-layout:1.0.0-alpha12@aar.
What could be the reason of it?
(Earlier today I removed ~/.gradle/cache
directory, in the process of upgrading to compose alpha12. )Vivek Sharma
02/11/2021, 3:26 PMModalBottomSheetLayout(
sheetContent = {
// sheet content
}
) {
// content of rest of the screen
}
So when I trigger modalBottomSheetState.show()
, sheet gets visible and blocks screen behind it but the back button is not closing the sheet
So I created composable and added it to navigation, but now sheet is taking fullscreen, regardless of sheet content and modifier.height()
, so how can I achieve behaviour like bottom sheet blocking back screen and navigating backnatario1
02/11/2021, 5:47 PMremember
function declaration? Is it like a dummy symbol that is interpreted by the compiler?Vsevolod Ganin
02/11/2021, 6:00 PMRecomposer.kt
. Only Compose’s code in the thread stack. I’m on alpha12Vivek Sharma
02/11/2021, 6:15 PMClass 'androidx.navigation.compose.NavHostControllerKt' is compiled by an unstable version of the Kotlin compiler and cannot be loaded by this compiler
I updated to alpha12
and getting error , any reasons?Alex Barcelo
02/11/2021, 6:25 PMactivity-compose
? When calling NavHost(…) the app crashs with java.lang.NoClassDefFoundError: Failed resolution of: Landroidx/activity/compose/LocalOnBackPressedDispatcherOwner;
. I added the following dependency to my project:
implementation("androidx.activity:activity-compose:1.3.0-alpha02")
and not it seems to work smoothlyeygraber
02/11/2021, 9:00 PMtylerwilson
02/11/2021, 9:15 PMDuplicate class androidx.compose.runtime.savedinstancestate.ExperimentalRestorableStateHolder found in modules jetified-runtime-saveable-1.0.0-alpha12-runtime (androidx.compose.runtime:runtime-saveable:1.0.0-alpha12) and jetified-runtime-saved-instance-state-1.0.0-alpha11-runtime (androidx.compose.runtime:runtime-saved-instance-state:1.0.0-alpha11)
Anybody here know how to clean out the jetifier cache? I tried cleaning all Gradles caches, but that did not fix it. Thanks!spierce7
02/12/2021, 12:00 AMitnoles
02/12/2021, 12:06 AMzoha131
02/12/2021, 1:04 AMDisposableEffect
with empty onDispose
is a code smell. And we should avoid that.
I want to load an article from server after user open the detail page. What should be the recommended way to load the data?
Previously I was using onActive
to load the data. ViewModel emits StateFlow
which the view collect as state.
// pre- Alpha-11
onActive { viewModel.loadData(articleID) }
// post - Alpha-11
DisposableEffect(articleID){
viewModel.loadData(articleID)
onDispose { }
}
Tony Kazanjian
02/12/2021, 1:39 AMkoin.androidx.compose
for viewmodel injection into their composables? There is a solution for compile errors for compose alpha 12 here (https://github.com/InsertKoinIO/koin/issues/1006), but wondering if others have seen the same runtime errors and if there are workaroundsKarthick
02/12/2021, 5:24 AMColton Idle
02/12/2021, 6:03 AMStarting with Arctic Fox Canary 6, you can now inspect layouts written with the new Android declarative UI framework, Jetpack Compose. Whether your app uses layouts fully written in Compose or layouts that use a hybrid of Compose and Views, the Layout Inspector helps you understand how your layouts are rendered on your running device.
This feature requires that each module using the Compose UI declare the following dependencies.Way cool feature!!! Good job team
allan.conda
02/12/2021, 9:08 AMFlag is not supported by this version of the compiler: -Xallow-jvm-ir-dependencies
allan.conda
02/12/2021, 9:08 AMFlag is not supported by this version of the compiler: -Xallow-jvm-ir-dependencies
BenjO
02/12/2021, 9:18 AMallan.conda
02/12/2021, 9:18 AM