mirror of
https://github.com/samsonjs/media.git
synced 2026-04-27 15:07:40 +00:00
formatting
This commit is contained in:
parent
ec69977a1c
commit
8ac74a009e
3 changed files with 13 additions and 17 deletions
|
|
@ -324,22 +324,20 @@ public final class SsaDecoder extends SimpleSubtitleDecoder {
|
||||||
if (style.bold && style.italic) {
|
if (style.bold && style.italic) {
|
||||||
spannableText.setSpan(
|
spannableText.setSpan(
|
||||||
new StyleSpan(Typeface.BOLD_ITALIC),
|
new StyleSpan(Typeface.BOLD_ITALIC),
|
||||||
0,
|
/* start= */0,
|
||||||
spannableText.length(),
|
/* end= */ spannableText.length(),
|
||||||
SpannableString.SPAN_EXCLUSIVE_EXCLUSIVE);
|
SpannableString.SPAN_EXCLUSIVE_EXCLUSIVE);
|
||||||
}
|
} else if (style.bold) {
|
||||||
else if(style.bold){
|
|
||||||
spannableText.setSpan(
|
spannableText.setSpan(
|
||||||
new StyleSpan(Typeface.BOLD),
|
new StyleSpan(Typeface.BOLD),
|
||||||
0,
|
/* start= */0,
|
||||||
spannableText.length(),
|
/* end= */ spannableText.length(),
|
||||||
SpannableString.SPAN_EXCLUSIVE_EXCLUSIVE);
|
SpannableString.SPAN_EXCLUSIVE_EXCLUSIVE);
|
||||||
}
|
} else if (style.italic) {
|
||||||
else if(style.italic){
|
|
||||||
spannableText.setSpan(
|
spannableText.setSpan(
|
||||||
new StyleSpan(Typeface.ITALIC),
|
new StyleSpan(Typeface.ITALIC),
|
||||||
0,
|
/* start= */0,
|
||||||
spannableText.length(),
|
/* end= */ spannableText.length(),
|
||||||
SpannableString.SPAN_EXCLUSIVE_EXCLUSIVE);
|
SpannableString.SPAN_EXCLUSIVE_EXCLUSIVE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -220,8 +220,7 @@ import java.util.regex.Pattern;
|
||||||
int boldFlag = Integer.parseInt(bold);
|
int boldFlag = Integer.parseInt(bold);
|
||||||
if (boldFlag == 1 || boldFlag == -1) {
|
if (boldFlag == 1 || boldFlag == -1) {
|
||||||
return true;
|
return true;
|
||||||
}
|
} else {
|
||||||
else{
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
} catch (NumberFormatException e) {
|
} catch (NumberFormatException e) {
|
||||||
|
|
@ -235,8 +234,7 @@ import java.util.regex.Pattern;
|
||||||
int italicFlag = Integer.parseInt(italic);
|
int italicFlag = Integer.parseInt(italic);
|
||||||
if (italicFlag == 1 || italicFlag == -1) {
|
if (italicFlag == 1 || italicFlag == -1) {
|
||||||
return true;
|
return true;
|
||||||
}
|
} else {
|
||||||
else{
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
} catch (NumberFormatException e) {
|
} catch (NumberFormatException e) {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue