logo       

[android-beginners] embedding listview inside a tabhost: msg#01191

AndroidBeginners

Subject: [android-beginners] embedding listview inside a tabhost


I'm wondering what the correct way is to embed a listview inside a
tabhost?
I've got :
<ListView
android:id="@+id/list"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>

Inside a tabhost but when I try to do anything with it (namely):
l1 = (ListView) findViewById(R.id.list);
l1.setAdapter(new ArrayAdapter<String>(this,
android.R.layout.simple_list_item_1, SITES));
It dies with a runtime exception.
Any idea what I might be doing wrong?

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.
To post to this group, send email to android-beginners@xxxxxxxxxxxxxxxx
To unsubscribe from this group, send email to
android-beginners-unsubscribe@xxxxxxxxxxxxxxxx
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~----------~----~----~----~------~----~------~--~---

<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | Mail Home | sitemap | FAQ | advertise