Shameem
Shameem

Reputation: 14339

Android: How to put image as Listview Header as in Twitter

What is the recommended way to put a header on the android app like the twitter app (screenshot below - header marked).

I am extending ArrayAdapter to create the listing. But cannot find a way to put the header.

alt text

Thanks in advance.

Upvotes: 1

Views: 1389

Answers (3)

Falmarri
Falmarri

Reputation: 48577

As others have said, that's not part of the listview. The google IO app uses the same kind of interface, and it's open source.

http://code.google.com/p/iosched/

Upvotes: 2

Labeeb Panampullan
Labeeb Panampullan

Reputation: 34823

You can use addHeaderView() or addFooterView() on ListView

Upvotes: 1

Kevin TeslaCoil
Kevin TeslaCoil

Reputation: 10097

That's not part of the ListView. Headers scroll with the list, but Twitter's headers are fixed. You don't need to use a ListActivity to host a ListView, you can create a LinearLayout or whatever and have the ListView as part of it.

Upvotes: 3

Related Questions