簡體   English   中英

相對布局中的ViewFlipper以及另一個相對布局子級。 格式不正確的標記

[英]ViewFlipper in the relative layout along with another relative layout child. Non well formed markup

我在ViewFlipper標記附近收到“根元素后面的文檔中的標記必須格式正確”的錯誤。 該錯誤的原因是什么?

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout android:layout_width="fill_parent"
    android:layout_height="fill_parent" xmlns:android="http://schemas.android.com/apk/res/android">
    <!-- storage layout -->

    <View android:id="@+id/gap" android:layout_width="wrap_content"
        android:layout_height="0dip" android:layout_alignParentBottom="true" />

    <RelativeLayout android:id="@+id/storage"
        android:layout_width="wrap_content" android:layout_height="wrap_content"
        android:layout_above="@id/gap" android:layout_marginBottom="10dp"
        android:layout_marginRight="27dp" android:layout_marginLeft="10dp"
        android:layout_toLeftOf="@id/bag" android:orientation="horizontal">

        <ImageButton android:id="@+id/ImageButton02"
            android:layout_width="wrap_content" android:layout_height="wrap_content"
            android:layout_alignTop="@+id/ImageButton01"
            android:layout_marginRight="16dp" android:layout_toLeftOf="@+id/ImageButton01"
            android:background="@drawable/key_stored" android:onClick="zoomImage" />

        <ImageButton android:id="@+id/ImageButton03"
            android:layout_width="wrap_content" android:layout_height="wrap_content"
            android:layout_alignTop="@+id/ImageButton01"
            android:layout_centerHorizontal="true" android:layout_marginRight="16dp"
            android:layout_toLeftOf="@+id/ImageButton02" android:background="@drawable/stool_stored"
            android:onClick="redSplashClicked" />

        <ImageButton android:id="@+id/ImageButton04"
            android:layout_width="wrap_content" android:layout_height="wrap_content"
            android:layout_alignTop="@+id/ImageButton01"
            android:layout_marginRight="16dp" android:layout_toLeftOf="@+id/ImageButton03"
            android:adjustViewBounds="true" android:background="@drawable/bottle_stored"
            android:onClick="redSplashClicked" />

        <ImageButton android:id="@+id/ImageButton05"
            android:layout_width="wrap_content" android:layout_height="wrap_content"
            android:layout_alignTop="@+id/ImageButton01"
            android:layout_marginRight="16dp" android:layout_toLeftOf="@+id/ImageButton04"
            android:adjustViewBounds="true" android:background="@drawable/key_stored"
            android:onClick="redSplashClicked" />

        <ImageButton android:id="@+id/ImageButton06"
            android:layout_width="wrap_content" android:layout_height="wrap_content"
            android:layout_alignTop="@+id/ImageButton01"
            android:layout_marginRight="16dp" android:layout_toLeftOf="@+id/ImageButton05"
            android:adjustViewBounds="true" android:background="@drawable/photo_stored"
            android:onClick="redSplashClicked" />

        <ImageButton android:id="@+id/ImageButton01"
            android:layout_width="wrap_content" android:layout_height="wrap_content"
            android:layout_alignParentBottom="true"
            android:layout_alignParentRight="true" android:background="@drawable/bottle_stored"
            android:onClick="store" />
    </RelativeLayout>
    <ImageButton android:id="@+id/bag" android:layout_width="65dp"
        android:layout_height="65dp" android:layout_alignBottom="@+id/storage"
        android:layout_alignParentRight="true" android:layout_marginRight="10dp"
        android:adjustViewBounds="true" android:onClick="redSplashClicked" />
    <ImageButton android:id="@+id/left" android:layout_width="wrap_content"
        android:layout_height="wrap_content" android:layout_alignLeft="@+id/storage"
        android:layout_centerVertical="true" android:background="@null"
        android:onClick="previousWall" android:src="@drawable/left" />
    <ImageButton android:id="@+id/right" android:layout_width="wrap_content"
        android:layout_height="wrap_content" android:layout_alignRight="@id/bag"
        android:layout_centerVertical="true" android:background="@null"
        android:onClick="nextWall" android:src="@drawable/right" />

</RelativeLayout>

<ViewFlipper android:id="@+id/water_room_flipper"
    android:layout_width="fill_parent" android:layout_height="fill_parent">
    <include layout="@layout/water_room_wall1" android:id="@+id/first" />
    <include layout="@layout/water_room_wall2" android:id="@+id/second" />
    <include layout="@layout/water_room_wall3" android:id="@+id/third" />
    <include layout="@layout/water_room_wall4" android:id="@+id/fourth" />
</ViewFlipper>

</RelativeLayout>

我知道了 我已經將不必要的結束標簽放在了視圖翻轉標簽之前。 實際上,我已經復制了xml並粘貼了。 結束標記以某種方式自行出現。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM