Skip to content

SubtitleView custom layout measurement #4788

@komissarovdenis

Description

@komissarovdenis

When you have a SubtitleView with custom layout measurement (Parent view has match_parent for both dims and SubtitleView has smaller size and positioned in center) SubtitlePainter will draw cues somewhere outside of SubtitleView's viewport and you'll see nothing.

Bug is probably located in SubtitlePainter in method setupTextLayout() on the line 346
textTop = parentBottom - textHeight - (int) (parentHeight * bottomPaddingFraction);
it's necessary to decrement parentTop as well.
Should be: textTop = parentBottom - parentTop - textHeight - (int) (parentHeight * bottomPaddingFraction);

Version 2.8.4
Thanks

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions