Skip to content

Commit a88b3c4

Browse files
committed
Checking for new line charactor in word wrap
Allows text to resize correctly with new line charactor wrap Signed-off-by: Naqi Syed <naqisyed@gmail.com>
1 parent 46921eb commit a88b3c4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

AutoFitTextViewLibrary/src/com/lb/auto_fit_textview/AutoResizeTextView.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ class AutoResizeTextView @JvmOverloads constructor(context: Context, attrs: Attr
9999
}
100100

101101
fun isValidWordWrap(before: Char, after: Char): Boolean {
102-
return before == ' ' || before == '-'
102+
return before == ' ' || before == '-' || before == '\n'
103103
}
104104

105105
override fun setAllCaps(allCaps: Boolean) {

0 commit comments

Comments
 (0)