Hi kevin,

check this link, this might help,

http://groups.google.com/group/android-developers/browse_thread/thread/d91239d49f722851

In manifest file, are you giving correct action and Category for the
ContactListActivity...

On Oct 27, 7:00 am, Kevin Bailey <[email protected]>
wrote:
> I'm trying to create an application that has 3 tabs.
> Under the middle tab should be a ListView. It starts up
> fine (on the left tab) but when I click the middle tab it crashes.
>
> The other two tabs are static data specified in the
> main.xml file. But the middle tab, I try to create
> dynamically. Here's the code from the main onCreate function:
>
>         // 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
> ...
>
> ContactListActivity is defined this way:
>
> public class ContactListActivity extends ListActivity
> {
> ...
>
> I get the feeling that I'm supposed to create the Intent
> with something like Intent.ACTION_VIEW but this is where
> I get lost. If this is the problem, I could try stuff
> until it works, but I'd prefer to understand why.
>
> Or is ContactListActivity supposed to override something ?
>
> Any help would be appreciated.
--~--~---------~--~----~------------~-------~--~----~
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