KMatle Expert Licensed User Longtime User Apr 11, 2018 #1 I have a multiline edittext. Is there a way to count the number of lines displayed?
DonManfred Expert Licensed User Longtime User Apr 11, 2018 #2 https://stackoverflow.com/questions...eving-a-textviews-visible-line-count-or-range Probably you can use JavaObject to do this Upvote 1
https://stackoverflow.com/questions...eving-a-textviews-visible-line-count-or-range Probably you can use JavaObject to do this
Erel B4X founder Staff member Licensed User Longtime User Apr 12, 2018 #3 You can use StringUtils.MeasureMultilineText and divide the result in the height of a single line (also measured with that method). You might need to add some corrections for the first and last line padding. Upvote 0
You can use StringUtils.MeasureMultilineText and divide the result in the height of a single line (also measured with that method). You might need to add some corrections for the first and last line padding.
Alexander Stolte Expert Licensed User Longtime User May 23, 2018 #4 Or use this: B4X: Sub getLineCount(TargetView As Object) As Int Dim source = TargetView As JavaObject Return source.RunMethod("getLineCount", Null) End Sub Upvote 0
Or use this: B4X: Sub getLineCount(TargetView As Object) As Int Dim source = TargetView As JavaObject Return source.RunMethod("getLineCount", Null) End Sub