Chachako
04/24/2022, 9:52 AMMehdi Haghgoo
04/24/2022, 10:17 AMCyril Kym
04/24/2022, 12:24 PMYacov Rosenberg
04/24/2022, 7:10 PMwintersoldier
04/24/2022, 7:57 PMAyfri
04/24/2022, 8:41 PMPaul Woitaschek
04/24/2022, 9:44 PMjames
04/25/2022, 1:46 AMLilly
04/25/2022, 2:03 AMFlowRow
and try to place 2 equal items per row. Applying fillMaxWidth(0.5f)
to every item ensures it occupies half of the max width but unfortunately it does not consider the mainAxisSpacing
of 4.dp. When I apply the mainAxisSpacing
only 1 item is placed per row because the 0.5f does not consider the 4.dp. Any ideas how to handle this properly?
Btw. I'm aware that a LazyVerticalGrid
would fit better here. I'm playing around with some layouts for the learning effect.
FlowRow(
modifier = Modifier
.fillMaxWidth()
.border(1.dp, Color.Red),
mainAxisSize = SizeMode.Expand,
//mainAxisSpacing = 4.dp,
crossAxisSpacing = 4.dp,
) {
actions.forEachIndexed { i, action ->
FlowItem(
modifier = Modifier.fillMaxWidth(0.5f),
title = stringResource(id = action.titleRes),
description = stringResource(id = action.descriptionRes),
backgroundColor = if (i % 2 == 0) LightGreen600 else LightGreenLight600,
onItemClick = onAction
)
}
}
Colton Idle
04/25/2022, 4:27 AMthe great warrior
04/25/2022, 10:33 AMMike
04/25/2022, 2:11 PMChachako
04/25/2022, 3:10 PMdimsuz
04/25/2022, 3:33 PMinternal fun Modifier.bottomOverlayPadding(): Modifier {
return Modifier
.align(Alignment.End) // can't use, need ColumnScope
}
Vikas Singh
04/25/2022, 3:52 PMChris Fillmore
04/25/2022, 4:36 PMFLAG_KEEP_SCREEN_ON
, is this answer the go-to way?
https://stackoverflow.com/questions/69039723/is-there-a-jetpack-compose-equivalent-for-androidkeepscreenon-to-keep-screen-al
It looks good to me, but I’m curious if Compose offers something out of the box. Thanks!nuhkoca
04/25/2022, 9:59 PMshadow
function applies elevation for all edgesjefbit
04/25/2022, 10:32 PMAhmed Shehata
04/25/2022, 10:48 PMTash
04/25/2022, 10:56 PM…running both Compose and View rendering within a single user session was very memory intensive, especially on lower-end devices. This cropped up both during rollouts of the code on the same page, but also when two different pages (for example, the Play Store home page and the search results page) were each on a different stack.Hoping the compose team & others can help answer these: • Have other folks experienced these performance issues? If so, what did you do to monitor/alleviate? • Does this mean that if the app is 50/50 View/Compose, this “two stack problem” will be exacerbated? • Will there come a point where we will have to “rush” to get our app to 100% Compose because of such issues? We currently have very rudimentary perf measurements in place, so open to recommendations there. 🙏🏼
An Tran
04/26/2022, 3:04 AMJonas Frid
04/26/2022, 7:57 AMwintersoldier
04/26/2022, 9:09 AMdambakk
04/26/2022, 9:31 AMonClickLabel
param? Is the semantics modifier and content description the way to go?Peng Wang
04/26/2022, 11:11 AMLilly
04/26/2022, 2:39 PMBox(
Modifier
.size(256.dp)
.border(
width = 16.dp,
brush = Brush.horizontalGradient(
0.0f to Color.White, 0.8f to Color.Red,
startX = 0f,
endX = 24f,
tileMode = TileMode.Repeated
),
shape = RectangleShape
)
) {
}
Chris Fillmore
04/26/2022, 3:57 PMCanvas(Modifier.clickable {})
. When the device screen is tall enough that the buttons are not floating above the video, all the buttons work as expected. However, some devices have shorter screens, and the buttons float over top the video. In those cases, the IconButtons work normally, but the Canvas clickable does not receive any click events.Tolriq
04/26/2022, 5:39 PMpablisco
04/26/2022, 8:14 PMTash
04/26/2022, 9:30 PM1.2.0-alpha08
and one of the Card
composables that was being used earlier with onClick
and indication
as params is deprecated with this error:
This API is deprecated with the introduction a newer Card function overload that accepts an onClick()But, the newer
Card
function that accepts onClick
doesn’t offer a way to customize indication
🤔 is there any other way to customize this?Tash
04/26/2022, 9:30 PM1.2.0-alpha08
and one of the Card
composables that was being used earlier with onClick
and indication
as params is deprecated with this error:
This API is deprecated with the introduction a newer Card function overload that accepts an onClick()But, the newer
Card
function that accepts onClick
doesn’t offer a way to customize indication
🤔 is there any other way to customize this?Louis Pullen-Freilich [G]
04/26/2022, 9:35 PMCard
- Material components are opinionated and show ripples, it’s not something that should be able to be customized on a component like this. For example, there is no way to change the indication for a Button
- Card
is the same here now.
If you want something custom, similar to if you wanted a custom Button
with different indication, you can fork it and make the necessary changesTash
04/26/2022, 9:51 PMModifier.clickable
to the Card
overload that does not have onClick
as parameter? (Reason being, we want to move forward with the upgrade but we are blocked from creating a custom component at the moment)Louis Pullen-Freilich [G]
04/26/2022, 10:06 PMTash
04/27/2022, 12:53 AMColton Idle
04/27/2022, 12:57 AMTash
04/29/2022, 5:14 PM