andrew
Zach Klippenstein (he/him) [MOD]
onPlaced
should give you the coordinates before the drawing phase of the current frame. I think it might even do so before the placement phase of your children., but I'm not sure. andrew
Zach Klippenstein (he/him) [MOD]
andrew
Zach Klippenstein (he/him) [MOD]
andrew
Zach Klippenstein (he/him) [MOD]
andrew
Zach Klippenstein (he/him) [MOD]
onSizeChanged
for that and get the result even sooner (measurement happens before placement)Casey Brooks
BoxWithConstraints
to get how big the parent layout is without dealing with callbacksZach Klippenstein (he/him) [MOD]
andrew
Zach Klippenstein (he/him) [MOD]
ComposeVisibility
class interacts with everything else. But because AndroidView
’s update
function runs before layout, you could probably store the view somewhere then tell it what size to use from the onSizeChanged
callback. Or, subclass the view and just make that call directly inside the view’s measurement callback.Because it sets the dimensions of the video feed to display I assumed you just needed a size since “dimensions” usually implies size, not location.
andrew
onGloballyPositioned
in that screenshot is what gets called with onGloballyPositioned
modifierZach Klippenstein (he/him) [MOD]
andrew
ViewVisibility
for the view system, so if that works, I’ll do it upon updateZach Klippenstein (he/him) [MOD]
ViewVisibility
? I’ve never heard of that Oh it’s from that library you’re using?andrew
onSizeChanged
also runs next composition as well, btwZach Klippenstein (he/him) [MOD]
andrew
Zach Klippenstein (he/him) [MOD]
andrew
Zach Klippenstein (he/him) [MOD]
andrew
Zach Klippenstein (he/him) [MOD]
andrew
Zach Klippenstein (he/him) [MOD]
size
method on VideoSinkVisibility? When does it do that?andrew
notifyChanged
should trigger an updateonGloballyPositioned
, both kinds, the modifier, and the method from the libraryChris Fillmore
org.webrtc.SurfaceViewRenderer
? (making this change would have other implications but I’m curious if it would solve your problem)andrew
Chris Fillmore
andrew