opening different intents in grid menu and navigation among them 
<p>Hello i am making grid menu for activity , all things are working well , when i click on specific image its show its position no like 0 1 . The problem is when i click on specfic image it should open the other intent , its not giving any error nor opening the other intent . kindly guide </p>

<pre><code>public class Mood extends Activity {

    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {

        super.onCreate(savedInstanceState);
        setContentView(R.layout.mood);

        GridView gridview = (GridView) findViewById(R.id.gridview);
        gridview.setAdapter(new ImageAdapter(this));

        gridview.setOnItemClickListener(new OnItemClickListener() {
            public void onItemClick(AdapterView&lt;?&gt; parent, View v, int position, long id)  {
                 switch (position) {
                 case 0:     
                    Intent intent = new Intent(v.getContext(),a.class);
                      startActivity(intent);
                 break;

                 case 1:     
                    Intent intent4 = new Intent(v.getContext(),b.class);
                      startActivity(intent4);
                 break;



                default:    
                 break;
             }

         }


        });
    }

    public class ImageAdapter extends BaseAdapter {
        private Context mContext;

        public ImageAdapter(Context c) {
            mContext = c;
        }

        public int getCount() {
            return mThumbIds.length;
        }

        public Object getItem(int position) {
            return null;
        }

        public long getItemId(int position) {
            return 0;
        }

        // create a new ImageView for each item referenced by the Adapter
        public View getView(int position, View convertView, ViewGroup parent) {
            View grid;

            if (convertView == null) { // if it's not recycled, initialize some
                // attributes
                grid = new View(mContext);
                LayoutInflater inflater = getLayoutInflater();
                grid = inflater.inflate(R.layout.moodcus, parent, false);

            } else {
                grid = (View) convertView;

            }
            ImageView imageView = (ImageView) grid.findViewById(R.id.imgview);
            TextView textView = (TextView) grid.findViewById(R.id.txtview);
            imageView.setImageResource(mThumbIds[position]);
            textView.setText(mMoodnames[position]);
            return grid;
        }

        // references to our images
        private Integer[] mThumbIds = { R.drawable.icon,
                R.drawable.icon  };

        private String[] mMoodnames = { "Angry", "Bored"};
    }


}
</code></pre>

<p>xml are </p>

<pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent" android:layout_height="fill_parent"
    android:orientation="vertical"&gt;
    &lt;ImageView android:id="@+id/imgview" android:layout_width="60dip"
        android:layout_height="60dip" android:layout_gravity="center" /&gt;


    &lt;TextView android:id="@+id/txtview" android:layout_width="wrap_content"
        android:textColor="#ffffff" android:layout_height="wrap_content"
        android:layout_gravity="center" /&gt;

&lt;/LinearLayout&gt;
</code></pre>

<p>and </p>

<pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;GridView
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/gridview"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:padding="5dp"
android:verticalSpacing="5dp"
android:horizontalSpacing="10dp"
android:numColumns="auto_fit"
android:columnWidth="80dp"
android:stretchMode="columnWidth"
android:gravity="center_horizontal"
    android:scaleType="fitXY"
 android:background="@drawable/ac"
/&gt;
</code></pre>

<p>logcat</p>

<pre><code>07-13 05:16:17.642: ERROR/AndroidRuntime(28966): Uncaught handler: thread main exiting due to uncaught exception
07-13 05:16:17.782: ERROR/AndroidRuntime(28966): android.content.ActivityNotFoundException: Unable to find explicit activity class {Dynamicgrid.test/Dynamicgrid.test.a}; have you declared this activity in your AndroidManifest.xml?
07-13 05:16:17.782: ERROR/AndroidRuntime(28966):     at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:1404)
07-13 05:16:17.782: ERROR/AndroidRuntime(28966):     at android.app.Instrumentation.execStartActivity(Instrumentation.java:1378)
07-13 05:16:17.782: ERROR/AndroidRuntime(28966):     at android.app.Activity.startActivityForResult(Activity.java:2789)
07-13 05:16:17.782: ERROR/AndroidRuntime(28966):     at android.app.Activity.startActivity(Activity.java:2895)
07-13 05:16:17.782: ERROR/AndroidRuntime(28966):     at Dynamicgrid.test.Mood$1.onItemClick(Mood.java:39)
07-13 05:16:17.782: ERROR/AndroidRuntime(28966):     at android.widget.AdapterView.performItemClick(AdapterView.java:284)
07-13 05:16:17.782: ERROR/AndroidRuntime(28966):     at android.widget.AbsListView.onKeyUp(AbsListView.java:1757)
07-13 05:16:17.782: ERROR/AndroidRuntime(28966):     at android.widget.GridView.commonKey(GridView.java:1470)
07-13 05:16:17.782: ERROR/AndroidRuntime(28966):     at android.widget.GridView.onKeyUp(GridView.java:1382)
07-13 05:16:17.782: ERROR/AndroidRuntime(28966):     at android.view.KeyEvent.dispatch(KeyEvent.java:1249)
07-13 05:16:17.782: ERROR/AndroidRuntime(28966):     at android.view.View.dispatchKeyEvent(View.java:3683)
07-13 05:16:17.782: ERROR/AndroidRuntime(28966):     at android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:758)
07-13 05:16:17.782: ERROR/AndroidRuntime(28966):     at android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:760)
07-13 05:16:17.782: ERROR/AndroidRuntime(28966):     at android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:760)
07-13 05:16:17.782: ERROR/AndroidRuntime(28966):     at android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:760)
07-13 05:16:17.782: ERROR/AndroidRuntime(28966):     at com.android.internal.policy.impl.PhoneWindow$DecorView.superDispatchKeyEvent(PhoneWindow.java:1691)
07-13 05:16:17.782: ERROR/AndroidRuntime(28966):     at com.android.internal.policy.impl.PhoneWindow.superDispatchKeyEvent(PhoneWindow.java:1111)
07-13 05:16:17.782: ERROR/AndroidRuntime(28966):     at android.app.Activity.dispatchKeyEvent(Activity.java:2045)
07-13 05:16:17.782: ERROR/AndroidRuntime(28966):     at com.android.internal.policy.impl.PhoneWindow$DecorView.dispatchKeyEvent(PhoneWindow.java:1667)
07-13 05:16:17.782: ERROR/AndroidRuntime(28966):     at android.view.ViewRoot.deliverKeyEventToViewHierarchy(ViewRoot.java:2390)
07-13 05:16:17.782: ERROR/AndroidRuntime(28966):     at android.view.ViewRoot.handleFinishedEvent(ViewRoot.java:2360)
07-13 05:16:17.782: ERROR/AndroidRuntime(28966):     at android.view.ViewRoot.handleMessage(ViewRoot.java:1658)
07-13 05:16:17.782: ERROR/AndroidRuntime(28966):     at android.os.Handler.dispatchMessage(Handler.java:99)
07-13 05:16:17.782: ERROR/AndroidRuntime(28966):     at android.os.Looper.loop(Looper.java:123)
07-13 05:16:17.782: ERROR/AndroidRuntime(28966):     at android.app.ActivityThread.main(ActivityThread.java:4595)
07-13 05:16:17.782: ERROR/AndroidRuntime(28966):     at java.lang.reflect.Method.invokeNative(Native Method)
07-13 05:16:17.782: ERROR/AndroidRuntime(28966):     at java.lang.reflect.Method.invoke(Method.java:521)
07-13 05:16:17.782: ERROR/AndroidRuntime(28966):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:860)
07-13 05:16:17.782: ERROR/AndroidRuntime(28966):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)
07-13 05:16:17.782: ERROR/AndroidRuntime(28966):     at dalvik.system.NativeStart.main(Native Method)
</code></pre>
