Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
SDK
/
exoplayer
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
ab57c801
authored
Apr 30, 2020
by
ibaker
Committed by
Oliver Woodman
May 01, 2020
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
Add bottomPaddingFraction support to SubtitleWebView
PiperOrigin-RevId: 309245320
parent
caeeae2c
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
3 deletions
library/ui/src/main/java/com/google/android/exoplayer2/ui/SubtitleWebView.java
library/ui/src/main/java/com/google/android/exoplayer2/ui/SubtitleWebView.java
View file @
ab57c801
...
@@ -172,6 +172,7 @@ import java.util.List;
...
@@ -172,6 +172,7 @@ import java.util.List;
float
linePercent
;
float
linePercent
;
int
lineTranslatePercent
;
int
lineTranslatePercent
;
@Cue
.
AnchorType
int
lineAnchor
;
if
(
cue
.
line
!=
Cue
.
DIMEN_UNSET
)
{
if
(
cue
.
line
!=
Cue
.
DIMEN_UNSET
)
{
switch
(
cue
.
lineType
)
{
switch
(
cue
.
lineType
)
{
case
Cue
.
LINE_TYPE_NUMBER
:
case
Cue
.
LINE_TYPE_NUMBER
:
...
@@ -189,14 +190,17 @@ import java.util.List;
...
@@ -189,14 +190,17 @@ import java.util.List;
linePercent
=
cue
.
line
*
100
;
linePercent
=
cue
.
line
*
100
;
lineTranslatePercent
=
0
;
lineTranslatePercent
=
0
;
}
}
lineAnchor
=
cue
.
lineAnchor
;
}
else
{
}
else
{
linePercent
=
100
;
linePercent
=
(
1.0f
-
bottomPaddingFraction
)
*
100
;
lineTranslatePercent
=
0
;
lineTranslatePercent
=
0
;
// If Cue.line == DIMEN_UNSET then ignore Cue.lineAnchor and assume ANCHOR_TYPE_END.
lineAnchor
=
Cue
.
ANCHOR_TYPE_END
;
}
}
int
lineAnchorTranslatePercent
=
int
lineAnchorTranslatePercent
=
cue
.
verticalType
==
Cue
.
VERTICAL_TYPE_RL
cue
.
verticalType
==
Cue
.
VERTICAL_TYPE_RL
?
-
anchorTypeToTranslatePercent
(
cue
.
lineAnchor
)
?
-
anchorTypeToTranslatePercent
(
lineAnchor
)
:
anchorTypeToTranslatePercent
(
cue
.
lineAnchor
);
:
anchorTypeToTranslatePercent
(
lineAnchor
);
String
size
=
String
size
=
cue
.
size
!=
Cue
.
DIMEN_UNSET
cue
.
size
!=
Cue
.
DIMEN_UNSET
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment