Skip to content

Half Dozen Hello Worlds Part 6 – Opening Activities

Using Your Activity

Open the AndroidManifest.xml and click on the Application tab.

3_Manifest

Now click on Add, Select Activity, and click okay. Now, next to name click browse and browse to your activity. If you save and run again, you should see that clicking on Hello 1 now displays a screen that says, “Hello World”.

I will leave adding getting the Hello 2 item on the list working as an exercise for the reader.

{ 2 } Comments

  1. Steve | August 19, 2012 at 10:24 pm | Permalink

    I’m having trouble with one of the instructions on this tute. It’s at the line setListAdapter(adapter);

    Where did this come from as Eclipse is giving me an error saying it needs to be created.

  2. ammu | April 7, 2014 at 11:54 pm | Permalink

    You will have to create a new class that extends ListActivity, as shown in sample

    public class HelloWorld6Activity extends ListActivity {
    ….
    }

{ 1 } Trackback

  1. Learn Android : Using Android Intents | December 13, 2011 at 12:19 am | Permalink

    […] this article I showed you how to open a specific activity using the startActivity method and an Intent that […]

Post a Comment

Your email is never published nor shared. Required fields are marked *