Colton Idle
03/10/2021, 5:03 PMlouiscad
03/10/2021, 6:12 PMCode | Split | Design
selector when using the @Preview
annotation. What might be the cause? On what is this showing up based upon?
Here's how it looks like on my machine.
EDIT: Yes, I tried restarting the IDE.itnoles
03/10/2021, 6:41 PMtcracknell
03/10/2021, 6:51 PMColton Idle
03/10/2021, 7:20 PMFunkyMuse
03/10/2021, 8:50 PMimplementation "androidx.hilt:hilt-navigation-compose:1.0.0-alpha01"
and
val viewModel: LatestBooksViewModel = hiltNavGraphViewModel(navBackStackEntry)
i don't want to create a new view model each time the user clicks the bottom navigation since it's just wasting API callsjaqxues
03/10/2021, 9:06 PMeygraber
03/10/2021, 9:24 PMNoé Casas
03/10/2021, 11:21 PMTextField
support `AnnotatedString`s like Text
? Doing so would make it possible to implement wysiwyg rich text editors.Tim Malseed
03/11/2021, 12:12 AMIf I make any code edits and try to deploy the app, I get this crash almost every time. Cleaning, building and running again always fixes the issue. Has anyone else encountered this, and is it tracked anywhere?..java.lang.NoSuchMethodError: No direct method <init>(Ljava/lang/String;Ljava/util/List;Ljava/lang/String;Lkotlin/jvm/functions/Function3;)V in class Lcom/acompany/weightr/features/Screen; or its super classes
Konyaco
03/11/2021, 12:41 AMandroidx.compose.ui.util
. Unresolved reference: fastMap
, lerp
, fastForEach
etc.
Compose 1.0.0-beta2, Android Studio Canary 9.
Anybody got the same problem?bohregard
03/11/2021, 2:44 AMShivam Sethi
03/11/2021, 3:20 AMcompose
to beta02
, but when I increment the version I get this error? I am not seeing any Kotlin
version update, I checked the latest updates. I am using latest AS Canary ?Tlaster
03/11/2021, 4:11 AMjava.lang.ClassCastException: androidx.compose.ui.platform.ParcelableMutableStateHolder cannot be cast to androidx.compose.runtime.MutableState
after 1.0.0-beta02 when using rememberSaveable
without custom saver, full stacktrace in threadSaiedmomen
03/11/2021, 6:56 AM@sample
references
* @sample androidx.compose.material.samples.CardSample
But they are not working for me and I can't see the samples.
Is there a dependency that I'm missing?
There was nothing in the google maveneygraber
03/11/2021, 8:02 AMlouiscad
03/11/2021, 8:44 AMDeepak Gahlot
03/11/2021, 9:01 AMCould not GET '<https://dl.google.com/dl/android/maven2/androidx/compose/compiler/compiler/1.0.0-beta02/compiler-1.0.0-beta02.pom>'. Received status code 503 from server: Service Unavailable
Disable Gradle 'offline mode' and sync project
Tlaster
03/11/2021, 10:20 AMjava.lang.IllegalArgumentException: Failed requirement
at MeasureAndLayoutDelegate.kt:194
after beta02? full stacktrace in threadloloof64
03/11/2021, 10:48 AMArchie
03/11/2021, 11:17 AMKotlin Multiplatform Module
where all compose related code would be inside androidMain
but although there are no code error, and the app gets successfully built, the application crashes when referencing a Composable
defined inside the KMM
Module.
Here is the Error:
java.lang.NoSuchMethodError: No static method Sample(Landroidx/compose/runtime/Composer;I)V in class Lph/kmm/feature/compose/SampleKt; or its super classes (declaration of 'com.kmm.compose.SampleKt' appears in /data/app/com.kmm.compose-TrHVyznV0bVt58iksPYp3g==/base.apk!classes7.dex)
alorma
03/11/2021, 11:29 AMbeta02
I'm getting: ViewTreeLifecycleOwner not set for this ComposeView. If you are adding this ComposeView to an AppCompatActivity, make sure you are using AppCompat version 1.3+.
Orhan Tozan
03/11/2021, 11:30 AMjava.lang.IllegalStateException: ViewTreeLifecycleOwner not found from DecorView@8896299[MainActivity]
after upgrading to beta02?Timo Drick
03/11/2021, 12:27 PMCLOVIS
03/11/2021, 2:18 PM@Composable
functions should not block nor suspend, and says that an event (a button click, for example) should be transmitted ‘up' and dealt with there. I don't really understand what this means or how it works in practice, and I can't find a page that describes that...
Assuming I have a simple function (that simulates a network call):
suspend fun networkGet(id: Int): String {
delay(2000)
return "some interesting value"
}
I would want to have a UI that has a button to launch the request, which then displays the results (whenever they arrive).
I guess the Composable
function should look like this:
@Composable
fun SomeView(results: List<String>, onRequest: (Int) -> Unit) {
Column {
Button(onClick = { onRequest(5) } {
Text("Load next")
}
for (result in results) {
Text(result)
}
}
}
So far it makes sense to me, but I don't understand how the call site would handle the event.jim
03/11/2021, 3:13 PMsteelahhh
03/11/2021, 3:17 PMeygraber
03/11/2021, 4:17 PMloloof64
03/11/2021, 4:18 PM1.0.0-beta02
Does not run on my device any moreSe7eN
03/11/2021, 4:33 PMSe7eN
03/11/2021, 4:33 PMIan Lake
03/11/2021, 5:38 PMUri.encode()
would the be usual way to encode contentSe7eN
03/12/2021, 12:25 PM