Answer the question
In order to leave comments, you need to log in
Android OS: how to display the time of messages like in Telegram and WhatsApp?
My fellow programmer claims that it is impossible to display the time in messages like in Telegram and WhatsApp without some kind of string calculations, they say, this is a big problem. It is on the phone that you need to calculate the length of the line on the screen, measure the text and calculate which words do not fit on the clock. Then implement an algorithm for wrapping words, etc. Is it really true? Or are there some hacks like in HTML layout, like a dev-analogue of a separate div and padding: -10px ?
Now we have time always on a separate line in the message area, which does not save space on the chat screen. As I want:
Answer the question
In order to leave comments, you need to log in
in this case, the easiest way is to lay out through relativeLayout, all the salt is in the relativity of the location of the element relative to each other
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question