private void configureSubtitleView() { CaptionStyleCompat style; float fontScale; if (Util.SDK_INT >= 19) { style = getUserCaptionStyleV19(); fontScale = getUserCaptionFontScaleV19(); } else { style = CaptionStyleCompat.DEFAULT; fontScale = 1.0f; } subtitleLayout.setStyle(style); subtitleLayout.setFractionalTextSize(SubtitleLayout.DEFAULT_TEXT_SIZE_FRACTION * fontScale); }
private void configureSubtitleView() { CaptionStyleCompat captionStyle; float captionFontScale; if (Util.SDK_INT >= 19) { captionStyle = getUserCaptionStyleV19(); captionFontScale = getUserCaptionFontScaleV19(); } else { captionStyle = CaptionStyleCompat.DEFAULT; captionFontScale = 1.0f; } subtitleLayout.setStyle(captionStyle); subtitleLayout.setFontScale(captionFontScale); }
@Override public void onCues(List<Cue> cues) { subtitleLayout.setCues(cues); }