Hi, I'm still not sure what you're trying to achieve. Are you really trying to embed an activity within another? You can look at the TabActivity source for a pretty clean example:
http://android.git.kernel.org/?p=platform/frameworks/base.git;a=blob;f=core/java/android/app/TabActivity.java;h=033fa0c8bf87b50f9400e457f64141d7ebad221a;hb=HEAD <http://android.git.kernel.org/?p=platform/frameworks/base.git;a=blob;f=core/java/android/app/TabActivity.java;h=033fa0c8bf87b50f9400e457f64141d7ebad221a;hb=HEAD> Cheers, James On Wed, Oct 14, 2009 at 1:31 AM, vchris80 <vuc...@gmail.com> wrote: > > thank for your reply, but I still have some troubles: > > now I have my main activiy been a ActivityGroup and the child activity > been a simple Activity. > > I start the child with this code: > > Intent startIntent = new Intent(MyMainActivity.this, > ChildActivity.class); > getLocalActivityManager().startActivity("and.mypackage.ChildActivity", > startIntent); > > this way, in the onCreate of the child activity, I can get the parent > and the activity results child of something by calling isChild() > method. Fine. But the screen actually doesn't appear. The > documentation of startActivity of LocalActivityManager says that "The > caller needs to take care of adding this window to a view hierarchy", > but I can't figure out how to do that. I watched the WindowManager for > a suitable method but with no luck. > > On 13 Ott, 19:09, James Yum <j...@google.com> wrote: > > Hi, > > Those are meant for an ActivityGroup and its embedded activities, for > > example a TabActivity. > > > > What you might want to look into, is this introduction on opening screens > > (activities): > > > > http://developer.android.com/guide/appendix/faq/commontasks.html#open... > > > > Cheers, > > James > > > > On Tue, Oct 13, 2009 at 7:25 AM, vchris80 <vuc...@gmail.com> wrote: > > > > > Hi all, I have a simple question: how I make an activity that is child > > > of another? > > > > > I use this code to start an activity from another: > > > > > Intent startIntent = new Intent(MyMainActivity.this, > > > ChildActivity.class); > > > startActivity(startIntent); > > > > > but on the onCreate method of ChildActivity, if I watch for getParent > > > () I get null, and if I ask for isChild() I get false,... so what I > > > miss? > > > > > thank you > > > --~--~---------~--~----~------------~-------~--~----~ 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@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~----------~----~----~----~------~----~------~--~---