Ruben Quadros
06/25/2022, 2:56 PMjava.lang.IllegalStateException: pending composition has not been applied
Mehdi Haghgoo
06/25/2022, 8:56 PMJi Sungbin
06/26/2022, 11:14 AMRecompoer#runRecomposeAndApplyChanges
. This function tracks changes and requests invalidation in the while statement and remains suspended until new changes are made through waitWorkAvailable()
in the while statement.
awaitWorkAvailable()
works with suspendCancellableCoroutine
and assigns Continuation
to workContinuation
if there is no scheduled task. The workContinuation
is resumed in the invokeOnCompletion of a Job called effectJob
. Therefore, in order for workContinuation
to resume, effectJob
must be completed. Recomposer#close
, which completes it, is used only in the withRunningRecomposer
function, but withRunningRecomposer
is not used.
So where does workContinuation
resume? I had the same concern a month ago, but I still haven’t solved it.
(Job.cancel is also possible to call invokeOnComplete, but cancel is used only for lifecycle handling through Owner)RE
06/26/2022, 2:41 PMClickableText
to pass touches to underlying components? In the case that the user does not click on a specific text, I hope that ClickableText
can pass the click event without consuming the click event, such as a clickable Card
Ahmed
06/26/2022, 4:03 PMitnoles
06/27/2022, 1:28 AMzt
06/27/2022, 2:16 AMjames
06/27/2022, 4:24 AMraghunandan
06/27/2022, 10:48 AMallan.conda
06/27/2022, 12:54 PMnuhkoca
06/27/2022, 1:31 PM1.2.0-rc02
sindrenm
06/27/2022, 2:13 PMModalBottomSheetLayout
and NavGraphBuilder.bottomSheet
builder, is there a way I can monitor the visible height of the bottom sheet in question? I want to pin a button to the bottom of the sheet, but it seems the actual height of the sheetContent
is larger than what's visible and is hidden «below the screen», so to speak.Alex
06/27/2022, 4:20 PMsystemBarsPadding()
,
is there a way to get the height of the system bars in dp
instead of applying the padding directly?ste
06/27/2022, 7:15 PMException during IR lowering
after updating from 1.2.0-beta03
to 1.2.0-rc0x
(Couldn't inline method call), is anyone facing the same problem?Adam Brown
06/27/2022, 9:51 PMLilly
06/27/2022, 11:46 PMDavide Giuseppe Farella
06/28/2022, 5:52 AMSlackbot
06/28/2022, 7:08 AMTim Malseed
06/28/2022, 7:11 AMmcpiroman
06/28/2022, 10:05 AMtheapache64
06/28/2022, 11:11 AMthis
vs then(this)
🤔Slackbot
06/28/2022, 1:30 PMBilly Newman
06/28/2022, 1:45 PMnuhkoca
06/28/2022, 3:18 PMUp
objects but it just reflects the first one not others(see the first row). I set neverEqualPolicy
but it doesn’t work, tho. What is your take for such cases? Thanks!
val state = remember { mutableStateOf(initial, neverEqualPolicy()) }
sealed class PerformancePulseUpdate : Serializable {
object Up : PerformancePulseUpdate()
object Down : PerformancePulseUpdate()
object None : PerformancePulseUpdate()
}
Mehdi Haghgoo
06/28/2022, 4:10 PMzt
06/29/2022, 4:56 AMMichael Bichlmeier
06/29/2022, 7:13 AM@Composable
fun MyScreen(viewModel: MyViewModel = get()){
val items by viewModel.itemsToDisplay.collectAsState(initial = emptyList())
ItemList(items)
// when the UI is displayed, the VM should track ContentViewed (only once)
LaunchedEffectContentViewed { viewModel.trackContentViewed() }
}
@Composable
private fun LaunchedEffectContentViewed(track: () -> Unit) {
val config = LocalConfiguration.current
var initialOrientation by rememberSaveable { mutableStateOf(config.orientation) }
val orientationChanged = initialOrientation != config.orientation
var wasExecuted by rememberSaveable { mutableStateOf(false) }
LaunchedEffect(Unit) {
if (!wasExecuted) {
if (!orientationChanged) track() // only track when orientation change was not the reason for recomposition
wasExecuted = true
}
if (orientationChanged) {
initialOrientation = config.orientation // update initialOrientation with new one
}
}
}
I’m quite sure I’m doing something wrong with my remember*
calls and I hope some can explain me what I have to adapt to achieve my requirements?
I also created a stackoverflow question for that.Feri Nagy
06/29/2022, 8:37 AMfillMaxWidth()
to the modifier passed to a composable?
@Composable
fun MyComponent(modifier: Modifier = Modifier) {
Box(modifier = modifier.fillMaxWidth()) {
// ...
}
}
On one hand, it feels like it hurts reusability, on the other it can remove some duplication. WDYT? Valid usage, frowned upon, should be avoided?Priyank
06/29/2022, 9:32 AMCannot locate windowRecomposer; View androidx.compose.ui.platform.ComposeView{e560fcf V.E...... ......I. 0,0-0,0} is not attached to a window
clusterManager?.markerCollection?.setInfoWindowAdapter(object : InfoWindowAdapter {
override fun getInfoContents(p0: Marker): View? {
return null
}
override fun getInfoWindow(p0: Marker): View {
val composeView = ComposeView(context).apply {
setContent {
Text("Hello World")
}
}
return composeView
}
})
So is there any way to use the compose function inside getInfoWindow()?Akram Bensalem
06/29/2022, 9:51 AMAkram Bensalem
06/29/2022, 9:51 AMste
06/29/2022, 10:04 AMCsaba Szugyiczki
06/29/2022, 10:12 AMFilip Wiesner
06/29/2022, 10:36 AMCsaba Szugyiczki
06/29/2022, 10:39 AMFilip Wiesner
06/29/2022, 10:41 AMCsaba Szugyiczki
06/29/2022, 10:45 AMFilip Wiesner
06/29/2022, 10:47 AMOleksandr Balan
06/29/2022, 10:57 AMWaveComposable
useful:
https://github.com/oleksandrbalan/android-dev-challenge-compose/blob/main/app/src/[…]java/com/example/androiddevchallenge/overview/WaveComposable.kt
It was inspired by this Dribble:
https://dribbble.com/shots/5967252-Tab-Bar-Animationandrew
06/29/2022, 3:07 PMdewildte
06/29/2022, 4:38 PMCsaba Szugyiczki
06/30/2022, 7:01 AM