Package 

Class PlaceholderKt

    • Method Summary

      Modifier and Type Method Description
      final static Modifier placeholder(Modifier $self, Boolean visible, Color color, Shape shape, PlaceholderHighlight highlight, Function1<Transition.Segment<Boolean>, FiniteAnimationSpec<Float>> placeholderFadeTransitionSpec, Function1<Transition.Segment<Boolean>, FiniteAnimationSpec<Float>> contentFadeTransitionSpec) Draws some skeleton UI which is typically used whilst content is 'loading'.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • placeholder

         final static Modifier placeholder(Modifier $self, Boolean visible, Color color, Shape shape, PlaceholderHighlight highlight, Function1<Transition.Segment<Boolean>, FiniteAnimationSpec<Float>> placeholderFadeTransitionSpec, Function1<Transition.Segment<Boolean>, FiniteAnimationSpec<Float>> contentFadeTransitionSpec)

        Draws some skeleton UI which is typically used whilst content is 'loading'.

        A version of this modifier which uses appropriate values for Material themed apps is available in the 'Placeholder Material' library.

        You can provide a PlaceholderHighlight which runs an highlight animation on the placeholder. The shimmer and fade implementations are provided for easy usage.

        A cross-fade transition will be applied to the content and placeholder UI when the visible value changes. The transition can be customized via the contentFadeTransitionSpec and placeholderFadeTransitionSpec parameters.

        You can find more information on the pattern at the Material Theming Placeholder UI guidelines.

        Parameters:
        visible - whether the placeholder should be visible or not.
        color - the color used to draw the placeholder UI.
        shape - desired shape of the placeholder.
        highlight - optional highlight animation.
        placeholderFadeTransitionSpec - The transition spec to use when fading the placeholder on/off screen.
        contentFadeTransitionSpec - The transition spec to use when fading the content on/off screen.