M
M
mezencevsem2018-10-04 00:17:02
Java
mezencevsem, 2018-10-04 00:17:02

How to detect end of line in TextView?

5bb530c960ffa359291454.png5bb530f0bdafc479334869.png
How to implement it?
In code or through relationships/constraints?
Preferably with an example, thanks

Answer the question

In order to leave comments, you need to log in

1 answer(s)
Y
Yuri, 2018-10-04
@mezencevsem

If you mean the timestamp in the message, the easiest way to do this is through a non-breaking space, i.e. add 10-15 non-breaking spaces + the timestamp itself to the TextView in addition to the line.
Effect - if there is space in the line, then the timestamp will be displayed at the end of the line. If not, on the next line at the end (if there are enough spaces). Timestamp resizing can be done with AbsoluteSizeSpan and colors with ForegroundColorSpan.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question