Class SubtitleView

    • Constructor Detail

      • SubtitleView

        public SubtitleView​(Context context)
        Deprecated.
      • SubtitleView

        public SubtitleView​(Context context,
                            @Nullable
                            AttributeSet attrs)
        Deprecated.
    • Method Detail

      • setCues

        public void setCues​(@Nullable
                            List<Cue> cues)
        Deprecated.
        Sets the cues to be displayed by the view.
        Parameters:
        cues - The cues to display, or null to clear the cues.
      • setViewType

        public void setViewType​(@com.google.android.exoplayer2.ui.SubtitleView.ViewType int viewType)
        Deprecated.
        Sets the type of View used to display subtitles.

        NOTE: VIEW_TYPE_WEB is currently very experimental, and doesn't support most styling and layout properties of Cue.

        Parameters:
        viewType - The SubtitleView.ViewType to use.
      • setFixedTextSize

        public void setFixedTextSize​(@Dimension
                                     int unit,
                                     float size)
        Deprecated.
        Sets the text size to a given unit and value.

        See TypedValue for the possible dimension units.

        Parameters:
        unit - The desired dimension unit.
        size - The desired size in the given units.
      • setUserDefaultTextSize

        public void setUserDefaultTextSize()
        Deprecated.
        Sets the text size based on CaptioningManager.getFontScale() if CaptioningManager is available and enabled.

        Otherwise (and always before API level 19) uses a default font scale of 1.0.

      • setFractionalTextSize

        public void setFractionalTextSize​(float fractionOfHeight)
        Deprecated.
        Sets the text size to be a fraction of the view's remaining height after its top and bottom padding have been subtracted.

        Equivalent to #setFractionalTextSize(fractionOfHeight, false).

        Parameters:
        fractionOfHeight - A fraction between 0 and 1.
      • setFractionalTextSize

        public void setFractionalTextSize​(float fractionOfHeight,
                                          boolean ignorePadding)
        Deprecated.
        Sets the text size to be a fraction of the height of this view.
        Parameters:
        fractionOfHeight - A fraction between 0 and 1.
        ignorePadding - Set to true if fractionOfHeight should be interpreted as a fraction of this view's height ignoring any top and bottom padding. Set to false if fractionOfHeight should be interpreted as a fraction of this view's remaining height after the top and bottom padding has been subtracted.
      • setApplyEmbeddedStyles

        public void setApplyEmbeddedStyles​(boolean applyEmbeddedStyles)
        Deprecated.
        Sets whether styling embedded within the cues should be applied. Enabled by default. Overrides any setting made with setApplyEmbeddedFontSizes(boolean).
        Parameters:
        applyEmbeddedStyles - Whether styling embedded within the cues should be applied.
      • setApplyEmbeddedFontSizes

        public void setApplyEmbeddedFontSizes​(boolean applyEmbeddedFontSizes)
        Deprecated.
        Sets whether font sizes embedded within the cues should be applied. Enabled by default. Only takes effect if setApplyEmbeddedStyles(boolean) is set to true.
        Parameters:
        applyEmbeddedFontSizes - Whether font sizes embedded within the cues should be applied.
      • setStyle

        public void setStyle​(CaptionStyleCompat style)
        Deprecated.
        Sets the caption style.
        Parameters:
        style - A style for the view.
      • setBottomPaddingFraction

        public void setBottomPaddingFraction​(float bottomPaddingFraction)
        Deprecated.
        Sets the bottom padding fraction to apply when Cue.line is Cue.DIMEN_UNSET, as a fraction of the view's remaining height after its top and bottom padding have been subtracted.

        Note that this padding is applied in addition to any standard view padding.

        Parameters:
        bottomPaddingFraction - The bottom padding fraction.