Android旋转木马视图

Android旋转木马视图,android,android-layout,Android,Android Layout,我只是导出一个包,以便在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="fill_parent" android:orient

我只是导出一个包,以便在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="fill_parent"
    android:orientation="vertical" >


    <ListView 
        android:id="@+android:id/list1"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"></ListView>

   <LinearLayout
        android:layout_weight="1"
        android:padding="5dip"
        android:gravity="top"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent" 
        >
        <com.me.controls.Carousel
                android:layout_width="fill_parent"
                android:layout_height="fill_parent" 
                android:id="@+id/carousel"  
                pj:UseReflection="true"
                pj:Items="@array/entries" 
                pj:SelectedItem="0"
                android:animationDuration="200"
            />  
</LinearLayout>             
</LinearLayout>

运行时,它给出错误:解析XML时出错:未绑定前缀。
但是我不知道为什么请任何人帮忙???

//您为listview创建的id是错误的

android:id="@+android:id/list1"
试试下面这个

android:id="@android:id/list"

//您为listview创建的id错误

android:id="@+android:id/list1"
试试下面这个

android:id="@android:id/list"

您需要在此处定义名称空间以使用自定义视图的属性


看看这个。

您需要在这里定义名称空间,以使用自定义视图的属性


看看这个。

试着写“android:orientation=“vertical”这一行,这也适用于listView中的linearLayout。刚刚意识到,正如我知道的,你不应该将android:layout\u width=“fill\u parent”与android:layout\u weight=“1”一起使用。。如果需要使用权重,请尝试设置android:layout_width=“0px”。我的问题不在listView te列表中。问题中出现的错误是由这些“pj:UseReflection=“true”pj:Items=“@array/entries”pj:SelectedItem=“0”属性引起的。你需要为它们添加一个(有效的)名称空间-就像在文档开头声明的“android:”一样。尝试为listView中的linearLayout写“android:orientation=“vertical”这一行。刚刚意识到,正如我所知,你不应该将android:layout\u width=“fill\u parent”与android:layout\u weight=“1”一起使用。。如果需要使用权重,请尝试设置android:layout_width=“0px”。我的问题不在listView te列表中。问题中出现的错误是由这些“pj:UseReflection=“true”pj:Items=“@array/entries”pj:SelectedItem=“0”属性引起的。您需要为它们添加一个(有效的)名称空间,就像“android:”在文档的开头声明一样。问题不在listView中列表工作正常,但当我添加错误时列表工作正常。问题不在listView中列表工作正常,但当我添加错误时列表工作正常