Android: Starting a Child Activity from a Parent Activity

by jmorris 30. June 2010 08:07

Despite my early mistakes, starting an Activity to launch a child view off of the main view is pretty simple in Android ;) First define an activity that will act as the parent, in most platforms this is analogous to a "main" method which indicates the starting point for the application and a child Activity that the will be activated from this Activity:

Then create an intent passing in a reference to the current Activity and the class definition of the child Activity. Finally pass the newly created Intent into the startActivity(...) method. Simple ;)

Tags: , , ,

Java | Android

Comments

8/18/2010 3:39:12 PM #

Ashik

Dude! If U start intent in child which runs parent_activity.class..then stack goes on increasing as both call eachother and it will be a disaster at last!!

Ashik India | Reply

8/23/2010 2:05:19 AM #

jmorris

@Ashik - Can you explain that in more detail? What is a better example of how to do this?

jmorris United States | Reply

11/22/2011 5:04:01 PM #

Technology Blog

Simply desire to say your article is as astounding. The clearness in your post is simply spectacular and i could assume you are an expert on this subject. Well with your permission allow me to grab your feed to keep up to date with forthcoming post. Thanks a million and please carry on the rewarding work.  Thanks !

Technology Blog | Reply

12/7/2011 1:01:44 AM #

Levrige Business Evolution Consultants

As a business owner you have many challenges and responsibilities.  Using Internet technology correctly can help you grow your business and increase sales quickly and easily without a huge investment.  Evolve your business and start working less while making more by leveraging Internet technology in your marketing.

Levrige Business Evolution Consultants | Reply

1/3/2012 5:03:21 AM #

Rob

Hey  social media has come a long way from being a mere outlet for sharing thoughts and images among friends and families. It has become a popular and effective method for business owners…

Rob | Reply

1/23/2012 4:18:41 AM #

steam cleaning Sacramento

Very informative post. I don't think I've come across the angle you present the information in a brilliant way.

steam cleaning Sacramento United States | Reply

1/27/2012 5:02:57 AM #

Atlanta SEO

What a timely post. I do appreciate your meaningful and interesting feedback. I am very surprised that more people do not discuss this topic more often.

Atlanta SEO | Reply

1/30/2012 12:58:13 PM #

Felony DUI

Android is the best mobile OS to date.

Felony DUI United States | Reply

Add comment


(Will show your Gravatar icon)

  Country flag

biuquote
  • Comment
  • Preview
Loading



Who Am I?

My name is Jeff Morris a software engineer/developer in Southern California, USA. My platform du jour is dotnet, but I dabble on the darkside occasionally.

Tag cloud

Page List