ms
04/17/2021, 2:59 AMCircularProgressIndicator
and I want to change it's size.
When using Modifier.size(size)
it's getting clipped.
Is there any other way to resize or is it not supported yet?Colton Idle
04/17/2021, 3:37 AMShakil Karim
04/17/2021, 11:22 AMrocketraman
04/17/2021, 12:17 PMLaunchedEffect
(that creates a toast), keying on a state variable (via by x.collectAsState()
). However, when the state is transient i.e. it changes relatively quickly from state A to state B, the LaunchedEffect
is not triggered at all for either state A or B.
Its a login screen and the user state transitions from a user login error to an anonymous user pretty quickly. I can make some changes to how the state is changed to avoid thus, but I'd like to understand what is going on here.orangy
04/17/2021, 12:36 PMe: …/SnakeLayout.kt: (30, 42): Type inference failed. Expected type mismatch: inferred type is @Composable() (Int, T) -> Unit but (Int, T) -> Unit was expected
Code is kinda like this:
fun <T> SnakeLayout(…,
content: @Composable (Int, T) -> Unit) {
Layout(…,
content = { items.forEachIndexed(content) } // here
) { … }
}
If I expand the call to items.forEachIndexed { i, t -> content(i,t) }
it works fine. In version 0.4.0-build180 both variants worked.
(posting here, because I believe it is more to do with compiler plugin than desktop lib)Arsen
04/17/2021, 12:47 PMdata class Node(
val name: String,
val children: List<Node>
)
I want to follow UDF + single source of truth. Level of depth is unknown (assume it's unlimited). How to follow immutability for updates (add/remove node) in this case if i should at all. Maybe it worth to try mutable state, but idk how to cook mutable state with compose and don't break recomposition.Michal Klimczak
04/17/2021, 1:03 PMloloof64
04/17/2021, 3:49 PMWithConstraints
any more (AS reports a syntax error and does not find an alternative, nor purpose an import). What workaround should I use ? My use case is that :
• in portrait, one component must take the full client width (the application allocated width),
• in landscape, the same component must take the full client height.loloof64
04/17/2021, 4:12 PMloloof64
04/17/2021, 4:58 PMwisdom
04/17/2021, 5:40 PMdewildte
04/17/2021, 6:43 PMBottomSheetScaffold
the bottom sheet keeps expanding.
It seems like no matter what I do it just keeps popping open.
Has anybody else run into this problem?tad
04/17/2021, 8:25 PMrememberSaveable
with StateFlow<T>.collectAsState()
? I'd like to keep the state save/restore machinery in the composition if possible.dewildte
04/17/2021, 10:23 PMBoxWithConstraints()
?ms
04/18/2021, 5:14 AMApplication
reference in a composable, just like LocalContext.current
??Olivier Patry
04/18/2021, 11:31 AMArsen
04/18/2021, 2:24 PMSrSouza
04/18/2021, 2:54 PMAlejo
04/18/2021, 4:01 PMYASAN
04/18/2021, 4:33 PMJan Skrasek
04/18/2021, 8:17 PM@Composable
fun Content() {
Column(Modifier.childPadding(inner = 4.dp)) {
Text("...")
Text("...")
Text("...")
}
}
Ravi
04/18/2021, 10:14 PMjava.lang.IllegalArgumentException: The target value must have an associated anchor.
at androidx.compose.material.SwipeableState$animateTo$$inlined$collect$1.emit(Collect.kt:135)
dimsuz
04/18/2021, 11:07 PMContent(viewStates.collectAsState().value)
@Composable fun Content(state: ViewState) {
Text(text = state.title)
Text(text = state.description)
}
Would both Texts be always recomposed even if (for example) there were 5 emissions and in all 5 only title was changing?miqbaldc
04/19/2021, 6:42 AMmost of our code was referenced from official jetpack compose samples
Nathan Castlehow
04/19/2021, 8:16 AMSlava Glushenkov
04/19/2021, 3:27 PMRow{
LargeComposable{}
Column{
SmallComposable()
...
SmallComposable()
}
}
How can I reach Column height same as LargeComposable height. With ConstraintLayout I use
height = Dimension.fillToConstraints
zoha131
04/19/2021, 3:57 PMcontains(), count()
methods on String and listOf(), forEach()
methods for collections. Have anyone faced this issue recently?Lilly
04/19/2021, 5:18 PMZach Klippenstein (he/him) [MOD]
04/19/2021, 5:32 PMSebastian Neagrau
04/19/2021, 6:10 PMRow
inside a Surface
and specify the Row's width to be 300% of it's parent ? (the Surface) . In my row I want to have 3 Columns, those will have width 33% relative to the Row(which is 300% relative to my Surface/Phone), that means that my Columns will have the width 100% (relative to my Surface/Phone). So I will get in the end like a Carousel, a horizontal scrolling list that's overflowing the screen
I might be taking a wrong approach, so if you have any other alternatives that's even betterSebastian Neagrau
04/19/2021, 6:10 PMRow
inside a Surface
and specify the Row's width to be 300% of it's parent ? (the Surface) . In my row I want to have 3 Columns, those will have width 33% relative to the Row(which is 300% relative to my Surface/Phone), that means that my Columns will have the width 100% (relative to my Surface/Phone). So I will get in the end like a Carousel, a horizontal scrolling list that's overflowing the screen
I might be taking a wrong approach, so if you have any other alternatives that's even betterColton Idle
04/19/2021, 6:14 PMSebastian Neagrau
04/19/2021, 6:19 PMColton Idle
04/19/2021, 6:49 PM