dimsuz
01/14/2021, 5:36 PMif (isJobRunning) Box() else CircularIndicator() but that makes progress bar jump.
In old View system I would wrap them both in FrameLayout and have the indicator use layout_gravity=center while setting box.visibility = INVISIBLE .
What path should I take in Compose?Vsevolod Ganin
01/14/2021, 6:02 PMBox. Box is analogue for FrameLayoutVsevolod Ganin
01/14/2021, 6:03 PMlayout_gravity=center use Modifier.align for both childrendimsuz
01/14/2021, 8:20 PMBox to always retain size of the largest child, even if it's not currently in composition. With FrameLayout this is solved by having Invisible state which retains view size during a layout phase. Not so here...Vsevolod Ganin
01/14/2021, 8:26 PMINVISIBLE is Modifier.opacity(0f) nowdimsuz
01/14/2021, 8:28 PMVsevolod Ganin
01/14/2021, 8:32 PMINVISIBLE. There was a discussion sometime ago and it seems that community agreed on that is INVISIBLE is now opacity(0f) .
https://kotlinlang.slack.com/archives/CJLTWPH7S/p1594659399205900Vsevolod Ganin
01/14/2021, 8:34 PMdimsuz
01/15/2021, 12:12 PM