Package 

Interface PlaceholderHighlight


  • @Stable()@Deprecated(message = 
    accompanist/placeholder is deprecated and the API is no longer maintained. 
    We recommend forking the implementation and customising it to your needs. 
    For more information please visit https://google.github.io/accompanist/placeholder
    ) 
    public interface PlaceholderHighlight
    
                        

    A class which provides a brush to paint placeholder based on progress.

    • Method Summary

      Modifier and Type Method Description
      abstract Brush brush(@FloatRange(from = 0.0.toDouble(), to = 1.0.toDouble()) Float progress, Size size) Return a Brush to draw for the given progress and size.
      abstract Float alpha(Float progress) Return the desired alpha value used for drawing the Brush returned from brush.
      abstract InfiniteRepeatableSpec<Float> getAnimationSpec() The optional AnimationSpec to use when running the animation for this highlight.
      • Methods inherited from class java.lang.Object

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

      • brush

         abstract Brush brush(@FloatRange(from = 0.0.toDouble(), to = 1.0.toDouble()) Float progress, Size size)

        Return a Brush to draw for the given progress and size.

        Parameters:
        progress - the current animated progress in the range of 0f..1f.
        size - The size of the current layout to draw in.
      • alpha

         abstract Float alpha(Float progress)

        Return the desired alpha value used for drawing the Brush returned from brush.

        Parameters:
        progress - the current animated progress in the range of 0f..1f.
      • getAnimationSpec

         abstract InfiniteRepeatableSpec<Float> getAnimationSpec()

        The optional AnimationSpec to use when running the animation for this highlight.