Question

I try to add the android coverflow in my own android projet

when myt activity launched , I get the following error:

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 :

Any suggestions?

Was it helpful?

Solution

Seems like you need to use pl.polidea.coverflow.CoverFlow instead of view in your xml, for example:

<?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>
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top