嗨,我正在尝试创建一个 xml 文件,其中包括 1-标签“任务”和用于用户输入的文本视图 2-标签“价格”和用于用户输入的文本视图 3-标签“类别”和带有 6 个选项的组合框 4-标签“结束日期”和旁边的日历 5-标签“提醒日期”和旁边的日历 最后一个用于保存问题的按钮是我在 Eclipse 上找不到组合框,第二个日历和按钮不出现在这里是代码
xml文件
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
<!-- Name Label -->
<TextView android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="@string/tsk"
android:paddingLeft="10dip"
android:paddingRight="10dip"
android:paddingTop="10dip"
android:textSize="17dip"/>
<!-- Input Name -->
<EditText
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_margin="5dip"
android:layout_marginBottom="15dip"
android:singleLine="true"/>
<!-- Price Label -->
<TextView android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="@string/price"
android:paddingLeft="10dip"
android:paddingRight="10dip"
android:paddingTop="10dip"
android:textSize="17dip"/>
<!-- Input Price -->
<EditText
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_margin="5dip"
android:layout_marginBottom="15dip"
android:singleLine="true"
android:inputType="numberDecimal"/>
<!-- category Label -->
<TextView android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="@string/cat"
android:paddingLeft="10dip"
android:paddingRight="10dip"
android:paddingTop="10dip"
android:textSize="17dip"/>
<!-- Input category -->
<EditText
android:layout_width="fill_parent"
android:layout_height="32dp"
android:layout_margin="5dip"
android:layout_marginBottom="15dip"
android:gravity="top"
android:lines="4" />
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="horizontal"
android:paddingTop="4dip"
android:paddingBottom="6dip"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<TextView
android:layout_width="90dip"
android:layout_height="wrap_content"
android:layout_weight="0.00"
android:text="@string/de" />
<Calender
android:layout_width="wrap_content"
android:layout_height="36dp" />
</LinearLayout>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="horizontal"
android:paddingTop="4dip"
android:paddingBottom="6dip"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<TextView
android:layout_width="90dip"
android:layout_height="wrap_content"
android:layout_weight="0.00"
android:text="@string/de" />
<Calender
android:layout_width="wrap_content"
android:layout_height="66dp" />
</LinearLayout>
<!-- Button Create task -->
<Button
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="@string/save"/>
</LinearLayout>
并且有很多错误
[2013-03-30 21:46:01 - checklist] W/ResourceType(12304): Bad XML block: header size 301 or total size 0 is larger than data size 0
[2013-03-30 21:46:01 - checklist] C:\Users\Najd\workspace\checklist\res\values\strings.xml:4: error: Found tag id where item is expected
[2013-03-30 21:46:01 - checklist] C:\Users\Najd\workspace\checklist\res\layout\add_task.xml:7: error: Error: No resource found that matches the given name (at 'text' with value '@string/tsk').
[2013-03-30 21:46:01 - checklist] C:\Users\Najd\workspace\checklist\res\layout\add_task.xml:24: error: Error: No resource found that matches the given name (at 'text' with value '@string/price').
[2013-03-30 21:46:01 - checklist] C:\Users\Najd\workspace\checklist\res\layout\add_task.xml:42: error: Error: No resource found that matches the given name (at 'text' with value '@string/cat').
[2013-03-30 21:46:01 - checklist] C:\Users\Najd\workspace\checklist\res\layout\add_task.xml:67: error: Error: No resource found that matches the given name (at 'text' with value '@string/de').
[2013-03-30 21:46:01 - checklist] C:\Users\Najd\workspace\checklist\res\layout\add_task.xml:80: error: Error: No resource found that matches the given name (at 'text' with value '@string/save').
[2013-03-30 21:46:01 - checklist] C:\Users\Najd\workspace\checklist\res\menu\activity_main_task.xml:3: error: Error: No resource found that matches the given name (at 'title' with value '@string/menu_settings').