How to add dates in recyclerview for a chat?
<p>Im trying to figure out what the way to go would be in order to create date-list-items for in a chat that show from which date the messages belong to.</p>

<p>The list would look like this:</p>

<pre><code>--- 1 week ago ---
msg
msg
msg
msg
msg
----- today -----
msg 
msg 
msg
msg
</code></pre>

<p>One way i can do it is by creating date time list items and then using some logic to decide on which position a date-time-list-item should go.</p>

<p>I was thinking that it may be possible to create a custom list divider for showing the date but i am not sure if this is possible.</p>

<p>How would you guys handle this?</p>