Android 带菜单的应用程序-如何使用?

Android 带菜单的应用程序-如何使用?,android,menu,connection,Android,Menu,Connection,我需要你的帮助。我需要制作一个应用程序作为学校项目。我制作了一个启动屏幕,然后在activity_main.xml上我想制作菜单。因此,我编写了代码,其中一部分是: <android.support.v7.widget.CardView android:foreground="?android:attr/selectableItemBackground" android:clickable="true" android

我需要你的帮助。我需要制作一个应用程序作为学校项目。我制作了一个启动屏幕,然后在activity_main.xml上我想制作菜单。因此,我编写了代码,其中一部分是:

<android.support.v7.widget.CardView
            android:foreground="?android:attr/selectableItemBackground"
            android:clickable="true"
            android:layout_width="160dp"
            android:layout_height="190dp"
            android:layout_margin="10dp">
            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:orientation="vertical"
                android:gravity="center">
                <ImageView
                    android:layout_width="64dp"
                    android:layout_height="64dp"
                    android:background="@drawable/circlebackgroundpurple"
                    android:src="@drawable/ic_account_balance_black_24dp"
                    android:padding="10dp"/>
                <TextView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:textStyle="bold"
                    android:layout_marginTop="10dp"
                    android:text="Admitere"
                    android:textAlignment="center"/>
                <View
                    android:layout_width="match_parent"
                    android:layout_height="1dp"
                    android:background="@color/lightgray"
                    android:layout_margin="10dp"/>
                <TextView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:gravity="center"
                    android:text="Conditii admitere specializarea IE"
                    android:padding="5dp"
                    android:textColor="@android:color/darker_gray"/>

            </LinearLayout>

现在我必须让它工作,当我按下点击图像时,它将打开一个新的页面。但我不知道如何建立这种联系。你能帮我一下吗?

给ImageView一个id,并在java代码中将其设置为onClicklistner。使用intent转到另一个活动

你的意思是想在一个框架内打开所有页面?所以基本上我需要为每个活动创建不同的类?因为当它打开一个新页面时,我想把一些信息放在那里是的。每个活动都有相应的java代码。非常感谢