【发布时间】:2011-12-06 23:55:24
【问题描述】:
我正在开发一个小 android 应用程序,但布局有问题,我一直试图在我的 xml 中找到错误,但我找不到它......
我得到的错误是“你必须提供一个 layout_width 属性”,但我做到了,但它仍然不起作用......
这是我的 XML 文件:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="vertical" >
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:weightSum="100" >
<TextView android:id="@+id/nombreEvento"
android:layout_height="fill_parent"
android:layout_weight="70"
/>
<TextView android:id="@+id/moneda"
android:layout_height="fill_parent"
android:layout_weight="10"
/>
<TextView android:id="@+id/totalEvento"
android:layout_height="wrap_content"
android:layout_weight="20"
/>
</LinearLayout>
<TextView android:id="@+id/fecha"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
/>
</LinearLayout>
【问题讨论】: