Daniel
02/28/2021, 4:50 PMAdam Powell
02/28/2021, 4:51 PMSe7eN
02/28/2021, 4:51 PMModifier.onSizeChanged
Adam Powell
02/28/2021, 4:51 PMDaniel
02/28/2021, 4:52 PMDaniel
02/28/2021, 4:52 PMDaniel
02/28/2021, 4:53 PMDaniel
02/28/2021, 4:54 PMBoxWithConstraints {
Box(Modifier
.myCustomDraw()
.myCustomTurn(percent, constraints.minWidth))
}
Adam Powell
02/28/2021, 4:58 PMAdam Powell
02/28/2021, 4:58 PMCanvas(...) {
this.size
}
or
Modifier.drawBehind {
this.size
}
Daniel
02/28/2021, 5:00 PMgraphicsLayer
, and I didn't find anything like size on it when I checked @Adam PowellDaniel
02/28/2021, 5:02 PMAdam Powell
02/28/2021, 5:03 PMfun Modifier.myModifier(...) = composed {
var size by remember { mutableStateOf(IntSize.Zero) }
// ...
Modifier.onSizeChanged { size = it }
.graphicsLayer {
size...
}
}
Daniel
02/28/2021, 5:05 PMDaniel
02/28/2021, 5:06 PMgraphicsLayer
provides very little, I had assumed that was because getting the other information was impossible