简体   繁体   English

Android coverflow:错误膨胀类pl.polidea.coverflow.CoverFlow

[英]Android coverflow : Error inflating class pl.polidea.coverflow.CoverFlow

I try to add the android coverflow in my own android projet 我尝试在我自己的android projet中添加android coverflow

when myt activity launched , I get the following error: 当myt活动启动时,我收到以下错误:

06-18 15:32:35.690: E/AndroidRuntime(15146): 
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.accessdev.myproject/com.accessdev.myproject.MainTMP_Activity}: java.lang.RuntimeException: Unable to start activity 

ComponentInfo{com.accessdev.myproject/com.accessdev.myproject.BonsPlansActivity}: android.view.InflateException: Binary XML file line #7: Error inflating class pl.polidea.coverflow.CoverFlow

my layout file : 我的布局文件:

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical"
android:layout_width="fill_parent" android:layout_height="fill_parent">



<view class="pl.polidea.coverflow.CoverFlow" xmlns:coverflow="http://schemas.android.com/apk/res/com.accessdev.myproject"
    coverflow:imageWidth="100dip" coverflow:imageHeight="150dip" android:id="@+id/coverflow" android:layout_width="fill_parent"
    android:layout_height="wrap_content" android:layout_marginTop="5dip">
</view>

<pl.polidea.coverflow.CoverFlow xmlns:coverflow="http://schemas.android.com/apk/res/com.accessdev.myproject"
    coverflow:imageWidth="100dip" coverflow:imageHeight="150dip" coverflow:withReflection="true"
    coverflow:imageReflectionRatio="0.2" coverflow:reflectionGap="2dip" android:id="@+id/coverflowReflect"
    android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_marginTop="5dip" />

<TextView android:text="STATUS" android:layout_width="fill_parent" android:layout_height="wrap_content"
    android:padding="5dip" android:id="@+id/statusText"></TextView>

line 7 is the first line with a reference to the coverflow : 第7行是第一行,引用了封面流程:

Any suggestions? 有什么建议么?

Seems like you need to use pl.polidea.coverflow.CoverFlow instead of view in your xml, for example: 好像你需要在xml中使用pl.polidea.coverflow.CoverFlow而不是view ,例如:

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical"
android:layout_width="fill_parent" android:layout_height="fill_parent">



<pl.polidea.coverflow.CoverFlow class="pl.polidea.coverflow.CoverFlow" xmlns:coverflow="http://schemas.android.com/apk/res/com.accessdev.myproject"
    coverflow:imageWidth="100dip" coverflow:imageHeight="150dip" android:id="@+id/coverflow" android:layout_width="fill_parent"
    android:layout_height="wrap_content" android:layout_marginTop="5dip">
</pl.polidea.coverflow.CoverFlow >

<pl.polidea.coverflow.CoverFlow xmlns:coverflow="http://schemas.android.com/apk/res/com.accessdev.myproject"
    coverflow:imageWidth="100dip" coverflow:imageHeight="150dip" coverflow:withReflection="true"
    coverflow:imageReflectionRatio="0.2" coverflow:reflectionGap="2dip" android:id="@+id/coverflowReflect"
    android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_marginTop="5dip" />

<TextView android:text="STATUS" android:layout_width="fill_parent" android:layout_height="wrap_content"
    android:padding="5dip" android:id="@+id/statusText"></TextView>

</LinearLayout>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM