Android
Android

Reputation: 9033

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

Upvotes: 3

Views: 2821

Answers (2)

Harry Sharma
Harry Sharma

Reputation: 2200

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.

Upvotes: 0

Nitesh
Nitesh

Reputation: 3903

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.

Upvotes: 1

Related Questions