Android: Starting a Child Activity from a Parent Activity

by jmorris 29. June 2010 23: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

Jeff Morris

Widget Tag cloud not found.

Unable to cast object of type 'ASP.widgets_tag_cloud_widget_ascx' to type 'App_Code.Controls.WidgetBase'.X

Widget Month List not found.

Unable to cast object of type 'ASP.widgets_month_list_widget_ascx' to type 'App_Code.Controls.WidgetBase'.X

Widget Page List not found.

Unable to cast object of type 'ASP.widgets_page_list_widget_ascx' to type 'App_Code.Controls.WidgetBase'.X

Widget Blogroll not found.

Unable to cast object of type 'ASP.widgets_blogroll_widget_ascx' to type 'App_Code.Controls.WidgetBase'.X

Widget Visitor info not found.

Unable to cast object of type 'ASP.widgets_visitor_info_widget_ascx' to type 'App_Code.Controls.WidgetBase'.X

Widget Visitor info not found.

Unable to cast object of type 'ASP.widgets_visitor_info_widget_ascx' to type 'App_Code.Controls.WidgetBase'.X