Marko Novakovic
07/05/2021, 10:36 PMkevindmoore
07/06/2021, 2:44 AMAdib Faramarzi
07/06/2021, 3:47 AMPhilip S
07/06/2021, 6:57 AMrememberLauncherForActivityResult
in Compose? With registerForActivityResult
you could send in a registry
parameter to prevent the real implementation from being called in UI-tests. However this is missing for the Compose equivalent.Peter Mandeljc
07/06/2021, 7:26 AMColumn(
modifier = Modifier.fillMaxHeight(),
verticalArrangement = Arrangement.SpaceBetween
) {
// How to expand this composable height as much as possible...
Text(text = "long text over multiple lines", modifier = Modifier.fillMaxHeight())
// ...without loosing sight of this one?
Text(text = "long text over multiple lines")
}
Kaustubh Patange
07/06/2021, 8:26 AMext {}
to define my dependencies so that studio can show a lint warning if there are any new version of library available?dimsuz
07/06/2021, 10:08 AMval state = remember { ... }
and then below this line I have Column { Box { Column { Component(state) } } }
, does it make any difference (performance or memory-wise) to have this state closer to its usage, i.e. should I put it in the innermost lambda rather than have it outside? I mean in this case none of intermediate composable lambdas need this state and this is known to stay like this. But having it "outside" is sometimes better for organizational purposes.Artem Kopan
07/06/2021, 11:12 AMAlexandru Hadăr
07/06/2021, 1:22 PMbeta-09
and rc01
)escodro
07/06/2021, 2:51 PMLocalBackPressedDispatcher
to handle back presses. The code is similar to:
setContent {
AlkaaTheme {
CompositionLocalProvider(LocalBackPressedDispatcher provides onBackPressedDispatcher) {
NavGraph()
}
}
}
But now my tests are failing with No Back Dispatcher provided
but I’m not finding a way to provide it.
composeTestRule.setContent {
AlkaaTheme {
CompositionLocalProvider(
LocalBackPressedDispatcher provides onBackPressedDispatcher //unresolved reference
) {
NavGraph()
}
}
}
I tried with both createComposeRule()
and createEmptyComposeRule()
.
Thanks a lot!Ngenge Senior
07/06/2021, 3:32 PMStefan Oltmann
07/06/2021, 5:16 PMrememberCoroutineScope()
but it looks like that "isActive" in the loading job still returns "true" even if it's not more on screen. To test that I have put into a delay of 1000ms.
Is there something like "onDisappeared" that I can use to cancel my job?
Or can I have that coroutineScope cancel the job automatic if it's no longer visible?Bryan Herbst
07/06/2021, 5:58 PMModifier.swipeable()
in Material? This doesn’t feel like a behavior that is Material-specific, and some of the internal bits make it difficult to recreate swipeable components such as ModalBottomSheet
in non-Material design systemsAnton Popov
07/06/2021, 7:31 PMTash
07/06/2021, 9:52 PMColton Idle
07/07/2021, 12:02 AMNurseyit Tursunkulov
07/07/2021, 10:46 AMLucien Guimaraes
07/07/2021, 11:01 AMBoris Kachscovsky
07/07/2021, 11:20 AMLayout(content = {
Composable1()
Composable2()
ComposableWhoseSizeDependsOnOtherComposables()
} { measurables, constraints ->
// I measure all the elements and get the width i'd like the last element to be
layout(width, height) {
// I place placables for composable 1 and 2
//
// How can i make composable 3's width depend on the measurements I had made on 1 and 2?
}
}
Michał Diner
07/07/2021, 1:21 PMBryan Herbst
07/07/2021, 2:50 PMMaterialTheme
)?
If so, do profile rules work in a library module (i.e. modules that are not packaged as AARs)? The release notes specifically say “Libraries can define these rules which will be packaged in AAR artifacts”, which seems to indicate perhaps not.dimsuz
07/07/2021, 3:15 PMColumn(modifier = Modifier.alpha(0.9f)) { Surface(elevation = 16.dp) }
is drawing drastically different shadow + gets clipped — compared to alpha(1f)
. None of this happens on other SDK versions. Is this some known/reported bug?Chris Johnson
07/07/2021, 4:11 PManimateColorAsState
to targetColor then back to initialColor with colors that have alpha? I'm running into seemingly a bug? with using alpha colors. It will animate to the desired color, then go back to almost initialColor but with some of the targetColor applied as alpha then back to targetColor and finally it will go to the initialColor again with no alpha.Zun
07/07/2021, 5:50 PMJan
07/07/2021, 7:13 PMKunal Raghav
07/07/2021, 7:26 PMYASAN
07/07/2021, 7:44 PMLazyVerticalGrid
to specific number of rows or do I have to manually calculate how many items I need to pass to it in order to make it stay on the number of rows I want to show?rsktash
07/07/2021, 8:21 PM@Cooposable
fun RenderSomeUI(modifier: Modifier, content: @Composable () -> TextUnit){
}
Luis Mierez
07/07/2021, 9:21 PMdimsuz
07/07/2021, 10:22 PMLazyColumn
). Will setting debuggable = false
improve things? Or maybe something else?