【发布时间】:2011-06-20 15:24:33
【问题描述】:
我正在为设计一个 android 应用程序编写新的 XML 文件,我在同一个 xml 中使用 2 个 linearLayour 时遇到了一些问题...
我使用以下代码出现“XML 文件中的错误:正在中止构建”:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<TextView android:id="@+id/texte_firsttab"
android:layout_height="wrap_content"
android:layout_width="wrap_content"/>
</LinearLayout>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="horizontal"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<Button android:id="@+id/accessGraphe"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:text="test"
android:onClick="selfDestruct" />
<Button android:id="@+id/accessGraphe2"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:text="test2"
android:onClick="selfDestruct" />
</LinearLayout>
我们可以将两个线性布局放在同一个xml文件中吗?
【问题讨论】:
标签: android xml android-linearlayout