arch-android

//Android/br.com.arch.toolkit.android.foldable.extension/observeFoldableStateChanges

observeFoldableStateChanges

[android]
fun ComponentActivity.observeFoldableStateChanges(layout: ERROR CLASS: Symbol not found for ViewGroup, orientation: FoldingFeature.Orientation, listener: OnFoldableStateChangeListener): Job

Observes the activity and notifies on device state changes

Parameters

android

   
layout The layout to be used for reference - needed whenever calculating the fold’s position on screen
orientation The desired orientation - needed whenever calculating the fold’s position on screen
listener Will receive a call to the correct function whenever there is a change