实施轮播时,我的 xml 文件有问题。main.xml 布局显示以下错误
在此行找到多个注释:
- error: No resource identifier found for attribute 'UseReflection' in package
''
- error: No resource identifier found for attribute 'SelectedItem' in package
''
- error: No resource identifier found for attribute 'Items' in package ''
- error: No resource identifier found for attribute 'Names' in package
''
主要布局如下所示:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:pj="http://schemas.android.com/apk/res/packagename"
xmlns:bm="package name"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical"
>
<TextView
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_weight="0.5"
android:text="text"
android:id="@+id/selected_item"
android:background="#1E1921"
android:textColor="#A85E4F"
android:textStyle="normal"
/>
<package.controls.Carousel
android:id="@+id/carousel"
android:layout_width="413dp"
android:layout_height="446dp"
android:layout_gravity="center_horizontal"
pj:Items="@array/entries"
pj:Names="@array/names"
pj:SelectedItem="0"
pj:UseReflection="true" >
</package.controls.Carousel>
</LinearLayout>
我的值文件夹中的 attrs.xml
<resources>
<declare-styleable name="Carousel">
<attr name="android:gravity" />
<attr name="android:animationDuration" />
<attr name="UseReflection" format="boolean"/>
<attr name="Items" format="integer"/>
<attr name="SelectedItem" format="integer"/>
<attr name="maxTheta" format="float"/>
<attr name="minQuantity" format="integer"/>
<attr name="maxQuantity" format="integer"/>
<attr name="Names" format="string" />
</declare-styleable>
</resources>
是日食错误还是我错过了一步。可以帮忙吗?