fengdai
AndroidView
factory
movableContentOf
val content = movableContentOf { AndroidView(factory = { context -> SomeView(context) }) } val content2 = movableContentOf { // content2 } val isLandscape = LocalConfiguration.current.orientation == Configuration.ORIENTATION_LANDSCAPE if (!isLandscape) Column { content() content2() } else Row { content() content2() }
Zach Klippenstein (he/him) [MOD]
remember
val content = remember { movableContentOf { AndroidView(factory = { context -> SomeView(context) }) } } val content2 = remember { movableContentOf { // content2 } } val isLandscape = LocalConfiguration.current.orientation == Configuration.ORIENTATION_LANDSCAPE if (!isLandscape) Column { content() content2() } else Row { content() content2() }
A modern programming language that makes developers happier.