createClassifier

open fun createClassifier(foldingFeature: FoldingFeature?, windowDpSize: DpSize): ScreenClassifier

Classifies the device as either fully opened or a foldable in one of several possible postures, based on the information given to it about the app's window.

The window's size class uses breakpoints following Google's recommended practices, as defined here: Window Size Classes.

This method is open for extension and override, particularly for creating fakes for testing purposes.

Return

Data modeling the complete posture and size of the device's screen.

Parameters

foldingFeature

A physical description of the screen's folded state, if a hinge is present.

windowDpSize

A rectangle indicating the X and Y dimensions of the screen in DPs (density-independent pixels).