StockAdaptiveSystemUiHelper
class StockAdaptiveSystemUiHelper(context: Context, viewVariantSelector: (widthDp: Int, heightDp: Int) -> StockAdaptivenessBucket = { widthDp, heightDp ->
StockAdaptivenessBucket.get(widthDp, heightDp)
}, bindDataFunction: (ViewDataBinding) -> Unit = {})
Reusable stock AdaptiveSystemUiHelper.
Provides a ViewFactory for a stock system layout based on the display size.
Parameters
context
The Android context.
viewVariantSelector
Selects the view variant based on display size. The default value uses the StockAdaptivenessBuckets.
bindDataFunction
Callback to bind additional data to the view.
Constructors
Link copied to clipboard
fun StockAdaptiveSystemUiHelper(context: Context, viewVariantSelector: (widthDp: Int, heightDp: Int) -> StockAdaptivenessBucket = { widthDp, heightDp ->
StockAdaptivenessBucket.get(widthDp, heightDp)
}, bindDataFunction: (ViewDataBinding) -> Unit = {})
Properties
Link copied to clipboard
The ViewFactory that the SystemUiHost should use to create stock views. Can be used directly from the system UI host with: