Pushpendra Kuntal
Pushpendra Kuntal

Reputation: 6186

Android :How can i make a list of events day wise.?

I am working in android. I want to show a list of events. I can make this list using listView.

But i want to add Day just before the list of events. Means i have two arrayList

  1. for Name of days
  2. for name of events for a day

So please suggest me how can i implement this.? you can provide me link related this topic or give a code help.

I need like this :--- enter image description here

Thank you in advance.

Upvotes: 3

Views: 967

Answers (2)

Paresh Mayani
Paresh Mayani

Reputation: 128428

You can either use Sectioned ListView(You have to customize ListView) or Expandable ListView(inbuilt).

Sectioned ListView examples:

Expandable ListView examples:

Upvotes: 2

Kurtis Nusbaum
Kurtis Nusbaum

Reputation: 30825

You can use a SimpleAdapter and bind the Name of the days to one TextView and the event name to another TextView. Your xml layout will then just be a LinearLayout, oriented horizontally, with two TextViews in it. Here's an example.

Upvotes: 1

Related Questions