Property

LocalBringIntoViewSpec

A composition local to customize the focus scrolling behavior used by scrollable containers (e.g.

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>
Jetpack Compose beyond MaterialFree components, screens and templates for apps that don’t look like Google’s. Copy them into your app, or let your coding agent add them.Browse for free

Content updated: