views:

1107

answers:

4

Hi, I want to change the current activity inside a tab in a tab activity,

after some research, I know that I need to use activity group to go this.

then I created a new class extends ActivityGroup with the code below:

public class FavShop extends ActivityGroup{ protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); LocalActivityManager m = getLocalActivityManager(); Intent i = new Intent(this, fav_shops.class); Window window = m.startActivity("favourite shop",i); setContentView(window.getDecorView()); } }

then I run the program, the program throw the ActivityNotFoundException when the intent for the tab is launched

I have no idea how to solve this problem, could anyone help me?

A: 

Check if this if of any help. Entire tutorial on android activities.

sbidwai
+4  A: 

Did you describe your new Activity in your AndroidManifest.xml? I forget to do that nearly every time I create an Activity.

Klondike
Yes, I did. I really don't know why it happen.
Mak Sing
SO to the rescue as usual. thx dude.
sweeney
+1  A: 

can you post a basic project reproducing this error?

hcpl
+1  A: 

I think you have missed to add activity in AndroidManifest.xml file, please check once

Thanks

Pampapathi