SrSouza
01/31/2020, 8:11 PMIan Warwick
01/31/2020, 11:30 PMWRAP_CONTENT
?Klaas Kabini
02/01/2020, 10:01 AMColumn(modifier = LayoutPadding(16.dp), arrangement = Arrangement.Begin) {
Text(text = "Klaas", style = MaterialTheme.typography().body1)
Spacer(LayoutHeight(12.dp))
Text(text = "James", style = MaterialTheme.typography().body1)
Spacer(LayoutHeight(12.dp))
Text(text = "Tom", style = MaterialTheme.typography().body1)
Spacer(LayoutHeight(12.dp))
Text(text = "Martin", style = MaterialTheme.typography().body1)
Spacer(LayoutHeight(12.dp))
ColoredRect(color = Color.Red, modifier = LayoutWidth.Fill, height = 200.dp)
}
Can’t we have something like this where we can arrange the children of a layout to the beginning but still give the fixed spacing to spaces them evenly without having to put spacers between the items.
Column(modifier = LayoutPadding(16.dp) + ChildSpacing(16.dp), arrangement = Arrangement.Begin) {
Text(text = "Klaas", style = MaterialTheme.typography().body1)
Text(text = "James", style = MaterialTheme.typography().body1)
Text(text = "Tom", style = MaterialTheme.typography().body1)
Text(text = "Martin", style = MaterialTheme.typography().body1)
ColoredRect(color = Color.Red, modifier = LayoutWidth.Fill, height = 200.dp)
}
Ian Warwick
02/01/2020, 10:03 AMContextAmbient
always activity? I need to get at the activity to silently get a ViewModel
behind the scenes using ViewModelProvider
fun getModel(): MyViewModel {
val context = ambient(ContextAmbient) as AppCompatActivity
return ViewModelProvider(context).get(MyViewModel::class.java)
}
Adam Powell
02/01/2020, 2:40 PMKlaas Kabini
02/01/2020, 5:07 PM@Stable
annotation on the composable functions within the framework mean the composable functions are stable and not subject to change? Is that right ?Klaas Kabini
02/01/2020, 5:55 PMIan Warwick
02/01/2020, 9:22 PMCrossAxisAlignment.Center
for Row as was in FlexRow in dev04?Zach Klippenstein (he/him) [MOD]
02/01/2020, 10:38 PMAdapterList
PR, excited to see this start to take shape. I believe Flutter implements their lists on top of a fairly complex “sliver” API which they also use to implement things like fancy Material collapsing AppBars ala CoordinatorLayout
. Does the Compose team have any thoughts about how to implement collapsing app bars with Compose?
(The AdapterList PR is here: https://android-review.googlesource.com/c/platform/frameworks/support/+/1218839)prat
02/02/2020, 4:52 AMjava.lang.IllegalArgumentException: LayoutNode@dcd3e1b children: 1 measureBlocks: MeasuringIntrinsicsMeasureBlocks@cccb17f{ measureBlock=androidx.ui.foundation.ScrollerKt$ScrollerLayout$1$2@876754c } shouldn't require remeasure. relayoutNodes consists of the top nodes of the affected subtrees
when trying out HorizontalScroller
and BottomDrawerLayout
. Any thoughts of what might have caused this? I basically put 2 sample code together.Ian Warwick
02/02/2020, 10:38 AMgrandstaish
02/02/2020, 3:54 PMlayout_weight
in a Row
in dev04?Kaushalya Pradeep
02/03/2020, 4:05 AMIan Warwick
02/03/2020, 9:55 AMRoar Gronmo
02/03/2020, 1:32 PMIan Warwick
02/03/2020, 10:37 PMdeniskrr
02/04/2020, 7:11 PMRoom
run in a Compose project?aoriani
02/04/2020, 10:12 PMLayoutHeight.Fill
in dev04 the proper replacement for ExpandedHeight
in dev03?Thierry
02/04/2020, 11:24 PMsatyan
02/05/2020, 5:18 PMviewModelScope
)
Is a composable screen going to expose a scope so that we’ll be able to provide a ViewModel associated with such a scope ?Rodrigo Fonseca
02/05/2020, 6:03 PMIan Warwick
02/05/2020, 9:36 PMDoubleTapGestureDetector
with dev04
this seemed to work but now it won't 😞
Clickable(onClick = { onClick(element) }) {
DoubleTapGestureDetector(onDoubleTap = { onDoubleTap(element) }) {
when (element) {
is TextElement -> TextElement(
element,
isSelected,
isEditing
)
is ShapeElement -> ShapeElement(element, isSelected)
is PianoRollElement -> PianoRollElement(element, isSelected)
}
}
}
Thierry
02/05/2020, 10:57 PMmolikto
02/06/2020, 10:58 AMMatej Drobnič
02/06/2020, 12:45 PMKarthick
02/06/2020, 4:56 PMThierry
02/06/2020, 7:50 PMZach Klippenstein (he/him) [MOD]
02/07/2020, 1:47 AMClip
isn’t doing anything. I can implement DrawModifier
and manually clip the canvas before drawing the children, and that works, but Clip
doesn’t seem to have any effect whatsoever. Is this a known issue?louiscad
02/07/2020, 10:55 AMPaolo Achdjian
02/07/2020, 12:16 PMPaolo Achdjian
02/07/2020, 12:16 PMZach Klippenstein (he/him) [MOD]
02/07/2020, 3:39 PMPaolo Achdjian
02/07/2020, 8:07 PM