Ensure some additional footer space if LTR next to RTL and vice versa

Change-Id: I139fd3ab32cf959d4e1a98767d2169d7b0d27a3a
This commit is contained in:
SpiritCroc 2021-05-20 10:45:08 +02:00
parent 5eb78ae95a
commit b5e3a83ff2
1 changed files with 1 additions and 1 deletions

View File

@ -65,7 +65,7 @@ class FooteredTextView @JvmOverloads constructor(
val widthLastLine = layout.getLineWidth(lastLine) val widthLastLine = layout.getLineWidth(lastLine)
// Required width if putting footer in the same line as the last line // Required width if putting footer in the same line as the last line
val widthWithHorizontalFooter = (if (looksLikeRtl == viewIsRtl) widthLastLine else maxLineWidth) + footerWidth val widthWithHorizontalFooter = (if (looksLikeRtl == viewIsRtl) widthLastLine else (maxLineWidth + 4*resources.displayMetrics.density)) + footerWidth
// Is there space for a horizontal footer? // Is there space for a horizontal footer?
if (widthWithHorizontalFooter <= widthLimit) { if (widthWithHorizontalFooter <= widthLimit) {