예제 #1
0
 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);
 }
예제 #2
0
 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);
 }
예제 #3
0
 @Override
 public void onCues(List<Cue> cues) {
   subtitleLayout.setCues(cues);
 }