Short Answer: I don't think you can

Longer Answer: ListActivity, as described in the javadocs:

ListActivity hosts a ListView object that can be bound to different
data sources. -- Note the singular "a", as in "one"

Screen Layout

ListActivity has a default layout that consists of a single, full-
screen list in the center of the screen. However, if you desire, you
can customize the screen layout by setting your own view layout with
setContentView() in onCreate(). To do this, your own view MUST contain
a ListView object with the id "@android:id/list" (or list if it's in
code)  -- Once again, a ListActivity can contain a single ListView
object with the id "@android:id/list".

I've had my own problems with ListViews and ListActivitys, as well,
including not being able to put a ScrollView around it and still have
the ListView scroll. Instead, the ListView now permanently has to take
up a chunk of the screen real estate, and everything else has to be
wrapped in a ScrollView on another section of the screen. Oh well.


On Mar 23, 6:44 am, Wouter <[email protected]> wrote:
> Hey,
>
> I want to have multiple listviews in my activity. Every listview will
> have a different adapter and every item in the listview must be
> clickable (other actions for every listview).
>
> So my problem now is that I can't create multiple clickable
> listviews.
> I have one listview like this <ListView android:id="@android:id/
> list"..
> and the other listview looks like this <ListView android:id="@+id/
> flightList"
>
> The first listview looks like this in my activity
> hotelList = (ListView)findViewById(android.R.id.list);
>
> the second:
>  listView = (ListView) findViewById(R.id.flightList);
>
> I can click on the first list and it does what it has to do, but i
> cant do anything with the second list..
> probably because it hasn't the android:id/list declaration :(
>
> does someone knows how I can solve this problem or other suggestions
> how I can get multiple lists in 1 activity!
>
> Thank you,
>
> Wouter
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to