Commit 222231dd by ibaker Committed by Oliver Woodman

Update SubtitleWebView to use center alignment by default

This mimics the behaviour of SubtitleTextView for cues that don't have
alignment set.

PiperOrigin-RevId: 309389392
parent 0774ee1d
...@@ -318,17 +318,16 @@ import java.util.List; ...@@ -318,17 +318,16 @@ import java.util.List;
private static String convertAlignmentToCss(@Nullable Layout.Alignment alignment) { private static String convertAlignmentToCss(@Nullable Layout.Alignment alignment) {
if (alignment == null) { if (alignment == null) {
return "unset"; return "center";
} }
switch (alignment) { switch (alignment) {
case ALIGN_NORMAL: case ALIGN_NORMAL:
return "start"; return "start";
case ALIGN_CENTER:
return "center";
case ALIGN_OPPOSITE: case ALIGN_OPPOSITE:
return "end"; return "end";
case ALIGN_CENTER:
default: default:
return "unset"; return "center";
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment