【发布时间】:2018-03-19 17:13:59
【问题描述】:
我需要你的帮助。我需要制作一个应用程序作为学校项目。我做了一个启动画面,然后在我想制作菜单的 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>
现在我必须让它工作,当我点击图像时,它会打开一个新页面。但我不知道如何建立这种联系。你能帮帮我吗?
【问题讨论】:
-
你的意思是你想在一帧内打开所有页面?
标签: android menu connection