Source set: Android
public val LocalBringIntoViewSpec: ProvidableCompositionLocal<BringIntoViewSpec> =
compositionLocalWithComputedDefaultOf {
val hasTvFeature =
LocalContext.currentValue.packageManager.hasSystemFeature(FEATURE_LEANBACK)
if (!hasTvFeature) {
DefaultBringIntoViewSpec
} else {
PivotBringIntoViewSpec
}
}
A composition local to customize the focus scrolling behavior used by scrollable containers (e.g. LazyLists, Pagers, LazyGrid). LocalBringIntoViewSpec has a platform defined behavior. If the App is running on a TV device, the scroll behavior will pivot around 30% of the container size. For other platforms, the scroll behavior will move the least to bring the requested region into view.
Source set: Common
public val LocalBringIntoViewSpec: ProvidableCompositionLocal<BringIntoViewSpec>