jannis
12/06/2021, 3:47 PMLinearProgressIndicator
, meaning full height, small width, animating from top to bottom? I tried to simply rotating it by 90°, which surprisingly worked somehow, e.g.:
Modifier
.height(8.dp)
.fillMaxWidth()
.graphicsLayer {
rotationZ = 90f
transformOrigin = TransformOrigin(0f, 0f)
}
But it seems limited to the width of the Composable, hence not filling the whole height.
Any other suggestions 😅 ?Tgo1014
12/06/2021, 4:01 PMmcpiroman
12/06/2021, 5:33 PMandroidx.compose.runtime
- mostly methods like ComposerImpl.end
, ComposerImpl.comsume
, SlotTable.access
. All other modules like layout, measuring, rendering seem to be OK (except for `Composer.materialize`which is also a very hot path).
What do I do - I have simply a Column of like 400 elements, which frankly is not that lot. No LazyColumn because it is even slower and secondly I have to have all the elements instantiated.
It is about CfD so I don't have separate release build. (I did manage to get rid of all `sourceInformation-`calls though which did not help much.)Florian
12/06/2021, 8:38 PMChris Johnson
12/06/2021, 10:15 PMText
composable, it seems the text is wrapping to a new line when it does not need to because the the text is so long and has no spaces in between. I noticed if I add spaces to the text it will wrap correctly. First image is wrong (current behavior) second image is what I want. Is this a bug with how Text calculates its MultiParagraph
object? Or is there a setting I'm missing... Code and images in 🧵Daniel Oliveira
12/06/2021, 11:01 PMYASAN
12/07/2021, 12:16 AMOG
12/07/2021, 5:40 AMImage(modifier = Modifier.fillMaxWidth.aspectRatio(1.50f)
And I want to know the resolved height in px, and use that as an offset for another child composable. For simplicity, imagine this Image
is inside a Box
and there is another child composable in this box that I want to apply an offset too, by doing some calculation using the Image
height. (This problem would be easy if the height was hardcoded like 200.dp, but I have to use aspect ratio)
I'm guessing the only way to do this is using the Layout
composable where I would need to measure and layout everything manually... But wondering if there's a more simpler approach that I'm just overlooking. Thanks!Tgo1014
12/07/2021, 9:25 AMoverflow = TextOverflow.Ellipsis
with no luckAnkit Shah
12/07/2021, 10:14 AMJason Ankers
12/07/2021, 12:27 PMrememberSaveable
saves against the nav destination registry. It would be good to be able to call rememberSaveable
against a SaveableStateRegistry higher up (i.e. a parent graph). Is this possible?Tomas Gordian
12/07/2021, 12:41 PMColton Idle
12/07/2021, 2:31 PMCard(
modifier = Modifier.padding(horizontal = 16.dp).fillMaxWidth().align(BottomCenter),
elevation = 8.dp) { //nothing }
When I add a HorizontalPager (replace where it says //nothing with the HP), then the card height becomes the size of the screen. Why and how do you make it only take up the height of the Text?
HorizontalPager(count = 10) { page ->
// Our page content
Text(text = "Page: $page", modifier = Modifier.fillMaxWidth())
}
Alex
12/07/2021, 2:46 PMJoseph Hawkes-Cates
12/07/2021, 2:58 PMjoadar
12/07/2021, 4:29 PM1.6.0
and Compose to 1.1.0-beta04
my Webview (inside AndroidView) in LazyColumn doesn’t scroll anymore. I tried to change to Column with verticalScroll but same issue. I can’t find any change related to this. Any help?mattinger
12/07/2021, 7:41 PM@Composable
fun MyCard(modifier: Modifier = Modifier, ...) {
Card(modifier = modifier, ...) { ... }
}
Colton Idle
12/07/2021, 7:59 PMSergey B
12/07/2021, 9:38 PMaoriani
12/07/2021, 10:45 PMzsperske
12/08/2021, 1:11 AMbohregard
12/08/2021, 2:53 AMrsktash
12/08/2021, 3:03 AMAndroidView(factory: ..)
inside Compose LazyList
As a workaround I checked duplicate ids and reset them to random id
Error message: IllegalArgumentException: Wrong state class, expecting View State but received class… This usually happens when two views of different type have the same id in the same hierarchy.Colton Idle
12/08/2021, 3:49 AMval backHandler = LocalOnBackPressedDispatcherOwner.current
MyButton(
clickEvent = { backHandler?.onBackPressedDispatcher?.onBackPressed() },
instead of this
MyButton(
clickEvent = { LocalOnBackPressedDispatcherOwner.current?.onBackPressedDispatcher?.onBackPressed() },
Tim Malseed
12/08/2021, 5:06 AMcomposeTestRule.mainClock
autoAdvance
to false, and then manually advancing the clock - but this doesn’t work very well when I actually want the UI test to take control of the clock.
Lottie has the ability to pass in a property representing whether an animation should run a finite number of times, or infinitely. I could pass in a different value for this to the Composable - but this feels akin to making something mutable just for the purpose of testing..Zoltan Demant
12/08/2021, 6:53 AMlouiscad
12/08/2021, 9:57 AMAnkit Shah
12/08/2021, 11:45 AMnatario1
12/08/2021, 1:04 PMNavType.StringArrayType
in routes? If so how should the route look like?natario1
12/08/2021, 1:04 PMNavType.StringArrayType
in routes? If so how should the route look like?Ian Lake
12/08/2021, 5:53 PMnatario1
12/08/2021, 8:21 PMto
s in the route.Ian Lake
12/08/2021, 9:21 PMnatario1
12/09/2021, 7:40 PM