Switch to different Activities onClick
<p>I am new to Android and exploring it at the moment. 
I have two Image Buttons which have to load different activities onClick.</p>

<pre><code>ImageButton btn1= (ImageButton)findViewById(R.id.timetable);
btn1.setOnClickListener(btnListener1);

ImageButton btn2= (ImageButton)findViewById(R.id.location);
btn2.setOnClickListener(btnListener2);
private OnClickListener btnListener1 = new OnClickListener()
{
    public void onClick(View view)
    {                        
         Intent myIntent = new Intent(getBaseContext(), HelloWorld1.class);
         startActivity(myIntent);
    }
};

private OnClickListener btnListener2 = new OnClickListener()
{
    public void onClick(View view)
    {                 
        Intent myIntent2 = new Intent(getBaseContext(), HelloWorld2.class);         
        startActivity(myIntent2);
    }
};
</code></pre>

<p>//my manifest  ......</p>

<pre><code>&lt;activity android:name="myApp" android:label="@string/app_name"&gt;
    &lt;intent-filter&gt;
        &lt;action android:name="android.intent.action.MAIN" /&gt;
        &lt;category android:name="android.intent.category.LAUNCHER" /&gt;
    &lt;/intent-filter&gt;
&lt;/activity&gt;        
&lt;activity android:name=".HelloWorld1"&gt;&lt;/activity&gt;
&lt;activity android:name=".HelloWorld2"&gt;&lt;/activity&gt;
</code></pre>

<p>//and my main.xml</p>

<pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;AbsoluteLayout
android:id="@+id/widget34"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
xmlns:android="http://schemas.android.com/apk/res/android"
android:background="#ffffff"
&gt;

&lt;GridView
    android:id="@+id/widget36"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:numColumns="2"
    android:layout_x="110px"

    android:layout_y="32px"
    android:layout_centerInParent="true"&gt;
&lt;/GridView&gt;
&lt;ImageButton
    android:id="@+id/timetable"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_x="210px"
    android:layout_y="142px"
    android:background="@drawable/icon2"&gt;
&lt;/ImageButton&gt;
&lt;ImageButton
    android:id="@+id/location"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_x="100px"
    android:layout_y="342px"
    android:background="@drawable/icon"&gt;
&lt;/ImageButton&gt;
</code></pre>

<p></p>

<p>This code causes errors, could anyone point where I am going wrong please.
Many thanks in advance.</p>
