Tgo1014
07/27/2021, 9:18 AMIcon(ImageBitmap.imageResource(R.mipmap.ic_launcher), contentDescription = null)
And I’m receiving:
java.lang.ClassCastException: class android.graphics.drawable.AdaptiveIconDrawable cannot be cast to class android.graphics.drawable.BitmapDrawable
Slackbot
07/27/2021, 9:29 AMShakil Karim
07/27/2021, 11:05 AMMehdi Haghgoo
07/27/2021, 11:36 AMFanilog
07/27/2021, 12:19 PMbodo
07/27/2021, 12:39 PMPaul Woitaschek
07/27/2021, 1:17 PMjulioromano
07/27/2021, 1:59 PMisSystemInDarkTheme()
always returned true
.
I have tested on an API28 emulator and can’t reproduce: the composables are always rendered in light mode (as they are supposed to).
Has anyone encountered a similar situation?Anastasia Rozovskaya
07/27/2021, 2:27 PMTiago Nunes
07/27/2021, 3:05 PMval imageFiles = produceState(initialValue = emptyList<File>(), imageRefs) {
imageRefs.map { imageRef ->
async {
downloadItemImage(imageRef, file)
}
}.awaitAll().filterNotNull()
}
Then, I’d like to map this List<File> to a List<Painter>, and send it to my ImagesRow composable, like this:
val painters = imageFiles.value.map { file ->
rememberImagePainter(file)
}
ImagesRow(painters = painters)
Problem is: The painters aren’t being updated when imageFiles is updated. Any ideas?Colton Idle
07/27/2021, 4:37 PMdispatchTouchEvent
method, but now I'm thinking if it'd be possible to have another wrapper composable just inside my Theme declaration that would be able to do the same thing.
i.e. Change this
MyAppTheme {
Scaffold { .. }
}
to this
MyAppTheme {
DebugDialogTouchInterceptor {
Scaffold { .. }
}
}
Does anyone know if it'd be possible to write something like that in compose?dimsuz
07/27/2021, 4:51 PMlerp
in Compose? Like when I have start=10.dp
, end=20.dp
, current=15.dp
and want to feed this to that function and receive fraction=0.5
back.Nacho Ruiz Martin
07/27/2021, 5:13 PMSharedFlow
instead of StateFlow
because this should be a hot observable.
I'm trying to collect the Flow in the Composable with val state = flow.collectAsState(defaultValue)
even if this feels weird because it's not a state.
• The Composable is not being recomposed when a new event is send, how's that achieved?
• Is there any better way to consume/collect/observe a SharedFlow in a Composable function?enighma
07/27/2021, 7:03 PMLandry Norris
07/27/2021, 7:52 PMRob
07/28/2021, 2:34 AMColton Idle
07/28/2021, 3:29 AMTgo1014
07/28/2021, 8:11 AMjava.lang.AbstractMethodError: abstract method "void androidx.lifecycle.DefaultLifecycleObserver.onCreate(androidx.lifecycle.LifecycleOwner)"
Rodri Represa
07/28/2021, 10:39 AMVitaliy Zarubin
07/28/2021, 10:50 AMval navigateToRegOne: () -> Unit = {
navController.navigate(GuestNavScreen.RegOne.route) {
anim {
enter = R.anim.slide_in
exit = R.anim.fade_out
popEnter = R.anim.fade_in
popExit = R.anim.slide_out
}
}
}
Why the animation might not work? The page is displayed instantly.Alejandro Rios
07/28/2021, 12:57 PMGeert
07/28/2021, 1:03 PMSemyon Zadorozhnyi
07/28/2021, 1:09 PMlesincs
07/28/2021, 1:28 PMChachako
07/28/2021, 1:29 PMalorma
07/28/2021, 1:34 PMTash
07/28/2021, 2:30 PMbodo
07/28/2021, 2:32 PMfun bindView(item) {
composeContainer.setContent {
MyCustomTheme {
item.Content()
}
}
}
1. Is it a good practice to do migration like this. i noticed that every call to MyCustomTheme creates new CompositionLocals that i create in it
2. will the view be recomposed every time the bind method is called?Geert
07/28/2021, 3:25 PMTin Tran
07/28/2021, 3:44 PMTin Tran
07/28/2021, 3:44 PMalorma
07/28/2021, 3:45 PMTin Tran
07/28/2021, 3:48 PMZach Klippenstein (he/him) [MOD]
07/28/2021, 4:07 PM