I'm trying to create a little application with 3 tabs. Under the
middle tab should be a ListView.
It starts up fine, but when I click the middle tab, it crashes.

The main window creates the tab this way:

        // this tab without a backing activity works fine
                mTabHost.addTab(mTabHost.newTabSpec("tab_test1")
                                .setIndicator("Compose")
                                .setContent(R.id.compose_tab));

        // this one never even reaches ContactListActivity::onCreate
            Intent intent = new Intent(this, ContactListActivity.class);

                mTabHost.addTab(mTabHost.newTabSpec("tab_test2")
                                .setIndicator("Contacts")
                                .setContent(intent));

Instead I appear to get an exception:

ActivityNotFoundException from
ViewRoot.handleMessage(Message) line 1583
ViewRoot(Handler).dispatchMessage(Message) line 99
Looper.loop() line 123
ActivityThread.main(String[]) line 3948
...

public class ContactListActivity extends ListActivity
...

Any ideas ?

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Beginners" 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-beginners?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to