[英]Android carousel View
我只是導出一個包,以在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"
您需要在此處定義名稱空間以使用自定義視圖的屬性。
看看這個問題 。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.