1

我的 r.java 在 Eclipse 中消失了,我知道这是由于我的 xml 中有一个错误。我是新手,所以我自己不知道以下编码有什么问题,我主要只是在互联网上关注教程。感谢任何可以提供帮助的人。

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    tools:context=".Main" />

-     <TextView
-         android:id="@+id/textView1"
-         android:layout_width="wrap_content"
-         android:layout_height="wrap_content"
-         android:layout_centerHorizontal="true"
-         android:layout_centerVertical="true" />
-
    <Button
        android:id="@+id/st"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:text="Start Test"
        android:layout_above="@+id/textView1"
        android:textStyle="bold|italic"
/>

    <LinearLayout
        android:id="@+id/linearLayout1"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_alignParentBottom="true"
        android:layout_alignParentLeft="true"
        android:gravity="center_vertical|center"
        android:orientation="vertical"
        android:weightSum="1" >

        <Button
            android:id="@+id/drinkcounter"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_weight="1"
            android:text="Unit Counter" />

        <Button
            android:id="@+id/drinklist"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_weight="1"
            android:text="Drink List" />

        <Button
            android:id="@+id/drinkdrivinglimit"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_weight="1"
            android:text="Drink Driving Limits" />

        <Button
            android:id="@+id/datarecord"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_weight="1"
            android:text="Data Records" />
    </LinearLayout>

</RelativeLayout>
4

0 回答 0