create

open fun create(context: Context): ScreenSizeThumbnailFormatSelector

Creates a new ScreenSizeThumbnailFormatSelector with a default factor of 0.5.

Return

a new instance of ScreenSizeThumbnailFormatSelector.

Parameters

context

an Android Context.

See also


open fun create(context: Context, factor: Float): ScreenSizeThumbnailFormatSelector

The factor parameter represents a percentage of the screen width and screen height.

Return

a new instance of ScreenSizeThumbnailFormatSelector.

Parameters

context

an Android Context.

factor

of screen width and screen height which will be used to select the format. For example an instance with width = 1920, height = 1080 and factor = 0.5 is equivalent to an instance with width = 960, height = 540 and factor = 1.0. The accepted range is from 0.0 to 1.0 otherwise, the value is clamped.