Jason Ankers
03/03/2022, 10:09 AMrememberSaveable
without an explicit key inside a movableContentOf
block doesn’t persist across config changes - is this expected?Bino
03/03/2022, 12:35 PMRajashekar
03/03/2022, 1:05 PMAlexander Maryanovsky
03/03/2022, 2:17 PMStateFlow
rather than just state values (e.g. by by mutableStateOf
)?Robert Menke
03/03/2022, 4:15 PMTomas Gordian
03/03/2022, 7:38 PMonTextLayout
I receive TextLayoutResult
object which has firstBaseline
or lastBaseline
. Is there a way to get any Baseline?lsiret
03/03/2022, 7:53 PMComposeView
(basically a TextView) Inside a androidx ConstraintLayout
inside a ViewHolder
. We notice that when the ViewHolder
is Recycled, the ComposeView
is not resized. It means that for a multi line text, sometimes the ComposeView
is too small (we lose line) or too big (unwanted margin).
We tried .disposeComposition()
inside the Adapter onRecycled,
We tried
setViewCompositionStrategy(
ViewCompositionStrategy.DisposeOnViewTreeLifecycleDestroyed
)
The only thing that worked is ti disable the Recycling setMaxRecycledViews( 0 )
but we lose benefit of RecyclerViewritesh
03/03/2022, 8:59 PMSideEffect
gets called ever-time my composable is invalidated
, but same does-not hold true for LaunchedEffect
?
Query in 🧵ste
03/03/2022, 10:15 PMBasicTextField
have a considerable larger width than the text inside it? It messes up visual alignment...K Merle
03/04/2022, 5:58 AMsmallshen
03/04/2022, 8:42 AMАлександр Макаров
03/04/2022, 10:05 AMAnton Shilov
03/04/2022, 11:29 AMonDraw
callback is considered a bad practice. In compose official docs we see creating instances of Offset, Path, etc. in DrawScope.
Is it going to be impacting draw performance the same way as in views? Or we shouldn't care about such things in compose world?Tobias Gronbach
03/04/2022, 4:32 PMNat Strangerweather
03/04/2022, 6:01 PMStylianos Gakis
03/04/2022, 8:53 PMMarcin Wisniowski
03/04/2022, 10:05 PMDavid Corrado
03/05/2022, 12:10 AMMicko Cabacungan
03/05/2022, 12:14 AManimateDpAsState
is going way past the targetValue
(I checked by logging in onSizeChange
modifier)? I've also specified a widthIn
max width but that also just gets totally ignored..
Source code example in thread for more contextandrew
03/05/2022, 1:37 AMtargetContentZIndex
after a ContentTransform
animation is done in AnimatedContent
?theapache64
03/05/2022, 9:17 AMPressInteraction.Release
? Currently it only provides pressPosition
🤔K Merle
03/05/2022, 1:00 PMtheapache64
03/05/2022, 3:38 PMIndication
? 🤔
I am having trouble understanding how do I animate inside IndicationInstance#ContentDrawScope.drawIndication()
.Problem is, its not a @Composable
method, which means I can’t use animation API methods such as animateXXXasState()
theapache64
03/05/2022, 7:43 PMIndicationInstance
’s draw scope ? 🤔 or indication will be always clipped to the parent?ritesh
03/06/2022, 2:52 AMRobert Menke
03/06/2022, 4:33 AMpopUpTo
correctly. I have a registration flow where I (for illustrative purposes) navigate to A
-> B
-> C
-> D
-> SignedIn
.
When I navigate to my SignedIn
route like so
navController.navigate("SignedIn") {
popUpTo("D") { inclusive = true }
}
and then press back the app goes back to C
. When I continue to press back it goes to B
and then A
. It seems like my call to popUpTo
is ONLY taking D
off the back stack rather than popping all previous destinations from the back stack. What am I misunderstanding?Mahmoud
03/06/2022, 9:54 AMMartin Nonnenmacher
03/06/2022, 1:02 PMcollectAsState()
with a flow that emits new values very frequently, about 10 times a second. The problem is that the SnapshotStateObserver.applyMaps
property keeps growing and consumes more and more memory over time. This can be reproduced with the code below. A heap dump shows that after 50,000 iterations there is a single instance of androidx.compose.runtime.snapshots.SnapshotStateObserver$ApplyMap[]
that consumes about 100 MB. As it seems to be by design that applyMaps
can only grow, is there a fundamental issue with my code, or is there another approach I could use for frequent updates without eventually running out of memory?
class TestState {
private val scope = CoroutineScope(Dispatchers.Default)
val value = MutableStateFlow(0)
init {
scope.launch {
while (true) {
value.value = value.value + 1
delay(100)
}
}
}
}
@Composable
fun App() {
val state = remember { TestState() }
val value = state.value.collectAsState()
Text("value = ${value.value}")
}
ziv kesten
03/06/2022, 1:07 PMSlider
ThumbSize other the to copy the whole code of Slider
into my project and change that internal value?Mehmet Peker
03/06/2022, 3:08 PMMehmet Peker
03/06/2022, 3:08 PMZun
03/06/2022, 4:55 PMyschimke
03/06/2022, 5:16 PMBen Trengrove [G]
03/06/2022, 8:34 PMMehmet Peker
03/06/2022, 8:49 PMColton Idle
03/06/2022, 10:00 PMMehmet Peker
03/07/2022, 8:17 PMColton Idle
03/08/2022, 12:46 AM