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
ead8abf0
authored
Jun 30, 2015
by
Oliver Woodman
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
Fixed incorrect caption sizes after device orientation change.
parent
35a9f263
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
library/src/main/java/com/google/android/exoplayer/text/SubtitleLayout.java
library/src/main/java/com/google/android/exoplayer/text/SubtitleLayout.java
View file @
ead8abf0
...
@@ -97,7 +97,7 @@ public final class SubtitleLayout extends ViewGroup {
...
@@ -97,7 +97,7 @@ public final class SubtitleLayout extends ViewGroup {
*/
*/
public
void
setFontScale
(
float
scale
)
{
public
void
setFontScale
(
float
scale
)
{
fontScale
=
scale
;
fontScale
=
scale
;
updateSubtitlesTextSize
();
updateSubtitlesTextSize
(
getHeight
()
);
for
(
SubtitleView
subtitleView
:
subtitleViews
)
{
for
(
SubtitleView
subtitleView
:
subtitleViews
)
{
subtitleView
.
setTextSize
(
textSize
);
subtitleView
.
setTextSize
(
textSize
);
...
@@ -125,7 +125,7 @@ public final class SubtitleLayout extends ViewGroup {
...
@@ -125,7 +125,7 @@ public final class SubtitleLayout extends ViewGroup {
int
height
=
MeasureSpec
.
getSize
(
heightMeasureSpec
);
int
height
=
MeasureSpec
.
getSize
(
heightMeasureSpec
);
setMeasuredDimension
(
width
,
height
);
setMeasuredDimension
(
width
,
height
);
updateSubtitlesTextSize
();
updateSubtitlesTextSize
(
height
);
for
(
int
i
=
0
;
i
<
viewsInUse
;
i
++)
{
for
(
int
i
=
0
;
i
<
viewsInUse
;
i
++)
{
subtitleViews
.
get
(
i
).
setTextSize
(
textSize
);
subtitleViews
.
get
(
i
).
setTextSize
(
textSize
);
...
@@ -175,8 +175,8 @@ public final class SubtitleLayout extends ViewGroup {
...
@@ -175,8 +175,8 @@ public final class SubtitleLayout extends ViewGroup {
}
}
}
}
private
void
updateSubtitlesTextSize
()
{
private
void
updateSubtitlesTextSize
(
int
height
)
{
textSize
=
LINE_HEIGHT_RATIO
*
getHeight
()
*
fontScale
;
textSize
=
LINE_HEIGHT_RATIO
*
height
*
fontScale
;
}
}
private
SubtitleView
createSubtitleView
()
{
private
SubtitleView
createSubtitleView
()
{
...
...
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