Class Banner.Builder

  • Enclosing class:
    Banner


    public static class Banner.Builder
    extends java.lang.Object
    • Constructor Detail

      • Builder

        public Builder(java.lang.String label)
    • Method Detail

      • withButtonText

        public Banner.Builder withButtonText(java.lang.String buttonText)
        Adds text to the banner button. If no text is present the button is set to {View.GONE}. Button text is null by default.
        Parameters:
        buttonText - the text to be displayed on the button.
        Returns:
        Builder with the buttonText set
      • setDuration

        public Banner.Builder setDuration(Banner.Duration duration)
        Sets the duration of how long the banner should be displayed. Banner is set to Short (4000ms) by default. See Banner.Duration for values.
        Parameters:
        duration - of the banner
        Returns:
        Builder with the duration set
      • build

        public Banner build()
        Constructs a new instance of Banner
        Returns:
        the constructed instance of Banner