简体   繁体   中英

android get date on listview like whatsApp does

I need to create a ListView with items that are continuously coming like in WhatsApp .

I want to display ListView with Date as SectionHeader.

I am using ListView from SQLite database using custom Adapter.

Now i need to display date of conversions like date in WhatsAPP

i found 1 link that look like some how usefull but i am not getting how to make it possible with date?

This is Link

Please help me to solve this problem

Use any stick header list view.
For reference you can use this one.
https://github.com/emilsjolander/StickyListHeaders .

and you can customize the section header view xml as your desire even like whatsapp containing date or any other way you want.

If it helps you, mark my ans. as up.

Yes you can do that using the same library what they used in that link you gave.Just try differentiating things with date where they did with alphabats. Let me know if you need any assistance. Please mark this up if this helps.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM